express Flashcards
What is Express useful for?
How does Express fit into a full-stack web application?
How do you add express to your package dependencies?
npm install express
What Express application method starts the server and binds it to a network PORT?
the app.listen method and port is often used to identify specific services.
What is Express middleware?
What is Express middleware useful for?
How do you mount a middleware with an Express application?
Which objects does an Express application pass to your middleware to manage the request/response lifecycle of the server?
What is an API endpoint?
what you send in the request path it’s everything after the colon
What is the appropriate “Content-Type” header for HTTP messages that contain JSON in their bodies?
What is the significance of an HTTP request’s method?
it tells you what you are doing with the information
Is a server required to do a request?
NO, it’s all convention
Where does express and node fit in the three tier architecture?
in the backend or server
What does the function app.get do?
it checks if the path matches (or endpoint) and if so it runs the function app.use
What does app.use mean?
it mounts a middleware function