npm Flashcards

1
Q

What is NPM?

A

A software registry where you can share and access code from a plethora of different users and organizations, a command line client, and a website

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

What is a package?

A

A package is a file or directory that is described by a package.json

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

How can you create a package.json with npm?

A

npm init –yes

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

What is a dependency and how to you add one to a package?

A

development-only packages, that are unneeded in production npm install (dependancy)

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

What happens when you add a dependency to a package with npm?

A

it installed the directory, and added a property in the dependency object in package.json

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

How do you mount a middleware with an Express application?

A

by using the use method

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

Which objects does an Express application pass to your middleware to manage the request/response lifecycle of the server?

A

the somethine request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
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
9
Q

What is the significance of an HTTP request’s method?

A

to express the intent of the request

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