reading-notes
My reading notes
Project maintained by brandomoki
Hosted on GitHub Pages — Theme by mattgraham
CRUD
Status Codes Based On REST Methods
- In your own words, describe what each group of status code represents:
- 100’s = header renders but body will fail before start
- 200’s = Success codes, all validation requirements were met during time of send
- 300’s = Redirect codes, client must issue new request to redirect
- 400’s = client error codes
- 500’s = server error codes
- What is a status code 202?
- valid request process when ready
- What is a status code 308?
- permanent redirect, tells user not to use current link
- What code would you use if an update didn’t return data to a client?
- What code would you use if a resource used to exist but no longer does?
- What is the ‘Forbidden’ status code?
REST API With Node.js, Express, & MongoDB
- Why do we need to pull our MongoDB database string out of our server and put it into our .env?
- Its private information .env is hidden
- What is middleware?
- function that have access to request obbjects
- What does app.use(express.json()) do?
- What does the /:id mean in a route?
- What is the difference between PUT and PATCH?
- Put is to update all patch updates whats needed
- How do you make a default value in a schema?
- What does a 500 error status code mean?
- What is the difference between a status 200 and a status 201?
- Successfully created an object is 201. 200 is successful nothing more