Before we begin, we want you to breathe, and relax. This should not be stressful. Challenging, yes. But we just want to gauge your experience so far and how you go about learning new things!
The summary of the challenge is to comment/describe what the code in this simple backend server is doing. If you have not seen this code before, it's alright to search the web, read documentation, and watch #tech TikTok. Anything you need to do to get a basic understanding. :) Once you have that, we'd like you to tell us in your OWN words that the code does.
There are two backend "routes"
-
/user/:id/name: used to get the name of the user given their id -
/classes/level/:difficulty: used to get the list of classes given their difficulty
You can test this routes with the following links
https://kadakareer-ms3-backend.glitch.me/user/10000/name
- will return
The user's name is Alice
https://kadakareer-ms3-backend.glitch.me/user/50000/name
- will return
User is not found
https://kadakareer-ms3-backend.glitch.me/classes/level/medium
- will return
{"classes":["Herbology","History of Magic"]}
https://kadakareer-ms3-backend.glitch.me/classes/level/extra-hard
- will return
{"classes":[]}
-
Remix this Glitch Project
- Click on kadakareer-ms3-backend in the top left
- In the dropdown, click Remix Project
- Wait for it to fully load
-
Follow the instructions specified in server.js
- If ever you accidentally delete the instructions, you can always refer back to the original file: https://glitch.com/edit/#!/kadakareer-ms3-backend
-
Share the link to your own remixed Glitch Project to your submission.
-
If you have questions, feel free to email carlo@kadakareer.com