npm Flashcards
What is the abbreviated version of “npm install”?
npm i
What command is used to install all dependencies for a MEVN application using NPM?
npm i express cors body-parser mongodb
What is the body-parser package used for in NPM?
It helps to parse out data from the “body” of requests/responses
What is the “nodemon” package in NPM?
It is used for developing node applications. It automatically restarts the node application when file changes in the directory are made
In NPM, what are devDependencies?
They are modules that are only required during development and not required for runtime (i.e. nodemon)
In NPM, what is the command to install a devDependency?
npm i -D
In a package.json file, what is the “start” key-value pair used for?
“scripts”: {“start”: “node server/index.js””}
It is where the command is placed to run the application
In a package.json file, what is the “dev” key-value pair used for?
“scripts”: {“dev”: “nodemon server/index.js””}
It is used to specify that nodemon will be used during development of the application
What is Node(.js)?
Node is a JavaScript runtime which allows JS to be used as a server-side language