npm Flashcards
What is NPM?
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
What is a package?
A package is a file or directory that is described by a package.json
How can you create a package.json with npm?
npm init –yes
What is a dependency and how to you add one to a package?
development-only packages, that are unneeded in production npm install (dependancy)
What happens when you add a dependency to a package with npm?
it installed the directory, and added a property in the dependency object in package.json
How do you mount a middleware with an Express application?
by using the use method
Which objects does an Express application pass to your middleware to manage the request/response lifecycle of the server?
the somethine request
What is the appropriate Content-Type header for HTTP messages that contain JSON in their bodies?
application/json
What is the significance of an HTTP request’s method?
to express the intent of the request