FlashKeepers

Web Development · College · College and University

Node.js II: Express and APIs

Express routing, middleware, request and response objects, error handling, REST conventions, validation and authentication basics.

About this set

40 basic cards for College Web Development. Set 2 of 2 in Node.js. It opens with "What does Express do?" and "What is routing in Express?". Study it alongside the other College sets below.

40 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What does Express do?
Show answerFramework for building web applications with Node.js
What is routing in Express?
Show answerMapping HTTP requests to handler functions based on method and path
What does app.listen() do?
Show answerStarts the server and listens for incoming requests on a specified port
What is a handler function?
Show answerFunction that receives req and res objects and processes a request
How do you define a GET route?
Show answerapp.get(path, handler)
How do you define a POST route?
Show answerapp.post(path, handler)
How do you define a PUT route?
Show answerapp.put(path, handler)
How do you define a DELETE route?
Show answerapp.delete(path, handler)
What are route parameters?
Show answerNamed URL segments prefixed with a colon, like /users/:id
How do you access route parameters?
Show answerThrough the req.params object
What are query parameters?
Show answerKey-value pairs appended to a URL after a question mark
How do you access query parameters?
Show answerThrough the req.query object
What does req.body contain?
Show answerParsed data sent in POST or PUT request bodies
What does req.headers contain?
Show answerHTTP headers sent by the client
What does req.method return?
Show answerThe HTTP verb of the incoming request (GET, POST, etc.)

25 more cards in the app

Study this set free