Giter Site home page Giter Site logo

internship-application-fullstack's People

Contributors

kristianfreeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

internship-application-fullstack's Issues

Questions for Step 2

For step 2:

  1. Request a (random: see #3) variant
    Make a fetch request to one of the two URLs, and return it as the response from the script.

I am wondering what type of response should we send back? Should it just be the plain text response from one of the two URLs? (aka HTML source code)

Permission Denied during wrangler config

I created an API token using the "Edit Cloudflare Workers" template, but when I entered the API token key, I got this error message:
Validating credentials...
Error: Permission denied (os error 13)

Does anyone know how to solve this issue?

Thanks

Wrangler unable to be installed

I've used NPM to install wrangler but every time I try to use the CLI, I get the following message:

      throw `You have not installed ${this.name ? this.name : "this package"}`;
      ^
You have not installed wrangler

I'm not sure how to fix this. I tried searching for a solution online and in the wrangler docs but couldn't find anything. What should I do?

3rd requirement is unclear

I didn't fully understand the requirement "3. Distribute requests between variants".
So, I don't have to show different pages to a single user every time(as it's said "when a client makes a request to the Workers script, the script should roughly return each variant"), so I don't have to use cookies for this. Is seems like it's enough just to remember user and count each of 2 urls, or I could use round-robin method, 'cause each of these will give 50% probability. I know that using cookies is extra-credit task "2. Persisting variants
", but I'd like to do both ways :)

CORS header ‘Access-Control-Allow-Origin’ missing

Hey guys, when I try to run a simple fetch to that URL, I get this error back (bottom). Is there anyone else experiencing the same issue? I've been doing some research on it, but it's still not clear to me how to fix it

code:

fetch("https://cfw-takehome.developers.workers.dev/api/variants" { /* properties here */ });

error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cfw-takehome.developers.workers.dev/api/variants. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Do we need to redirect the page?

For this requirement

  1. Distribute requests between variants

I am wondering what type of actions should we take. Should we simply redirect the page or fetch the content of the variant page and return that as a response?

I am currently working on the extra credit and I realized that with redirecting we probably can't do this task.

For each variant page, there are a number of items on the page that can be customized. Try changing the following values inside of the variant, adding your own text or URLs:

So what is the expected action?

Cookies can be written but not read from a serviceWorker

Extra Credit 2 should be removed or updated with a possible solution because headers are stripped from the request before it gets to the serviceWorker's handler. Cookies can be set but not read from the serviceWorker. localStorage and other storage solutions are not accessible from the serviceWorker either. In conclusion, persistence is not achievable at the moment.

The requirements in a nutshell

Hello!
So as far as I understand when the user visits the root URL of the app, it should either load variant 1 or variant 2, There is no home view for the given task right?

Can someone tell me how exactly I should upload my code as a zip? the submission link is only allowing me to attach a document.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.