Express Flashcards

1
Q

How do you add express to your package dependencies?

A

npm init –yes and then npm install express

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What Express application method starts the server and binds it to a network port?

A

listen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the appropriate Content-Type header for HTTP messages that contain Json in their bodies?

A

application/json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does fetch() return?

A

a promise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the default request method used by fetch()?

A

GET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you specificy the request method (GET, POST, etc.) when calling fetch()?

A

Fetch( () => {

How well did you know this?
1
Not at all
2
3
4
5
Perfectly