In your own words, describe what each group of status code represents:
100’s = informational status codes.
200’s = request accepted, done successfully
300’s = request redirected
400’s = errors in request, like URL errors or missng queries.
500’s = internal server errors.
What is a status code 202? request accepted and is under processing.
What is a status code 308? the current URL is not valid for request any more, redirected to another URL.
What code would you use if an update didn’t return data to a client? 204.
What code would you use if a resource used to exist but no longer does? 410.
What is the ‘Forbidden’ status code? no permission to access the resource.
Why do we need to pull our MongoDB database string out of our server and put it into our .env? for none local host uses.
What is middleware? a code that runs once the server gets request.
What does app.use(express.json())
do? lets the server accept JSON elements.
What does the /:id mean in a route? a parameter that can be accessed using req.params.id
What is the difference beween PUT and PATCH? PUT updates all the information while PAtch updates some.
How do you make a defalut value in a schema? using default: value
inside the property in need.