Why this topic matters as it relates to the material I am studying:
What is a status code 202? Accepted - Asynchronous processing of a request.
What is a status code 308? Permanent redirect - resource will be available at new URL.
What code would you use if an update didn’t return data to a client? 404 - Not Found
What code would you use if a resource used to exist but no longer does? 410 - Gone
Why do we need to pull our MongoDB database string out of our server and put it into our .env? We will want to use something that is not our local host so we place it into our environmental variable.
What is middleware? A software that allows different applications to communicate with each other.
What does app.use(express.json()) do? Parses incoming JSON information.
What does the /:id mean in a route? Alllows us to have a parameter that will have access to everything typed after it.
What is the difference between PUT and PATCH? PUT updates everything every time something new is added, but PATCH allows the info to get partially updated based off of input recieved.
How do you make a default value in a schema? Create a variable so that we can set objects in the schema with default values, ie. in video: names, subscribersToChannel, and subscribeDate
What does a 500 error status code mean? Internal Server Error means that the server encountered an unexpected condition that prevented request fulfillment.
What is the difference between a status 200 and a status 201? 200 means that the request was successfully received and processed. 201 means that only the request was successfull, and resource created.