Express Flashcards
1
Q
How do you add express to your package dependencies?
A
npm init –yes and then npm install express
2
Q
What Express application method starts the server and binds it to a network port?
A
listen.
3
Q
What is the appropriate Content-Type header for HTTP messages that contain Json in their bodies?
A
application/json
4
Q
What does fetch() return?
A
a promise
5
Q
What is the default request method used by fetch()?
A
GET
6
Q
How do you specificy the request method (GET, POST, etc.) when calling fetch()?
A
Fetch( () => {