npm
- Node Package Manager
- Npm is a program that fetches, installs, and manages modules written in Node.js from the web
So, It is able to install and utilize previously published modules via npm
npm is automatically installed when you install NodeJS
1
2
3
npm install
npm install connect // install connect module
node [file name] // run nodejs file
- Connect is an extensible HTTP server framework for node using “plugins” known as middleware.
package.json
The package.json file serves as a manifest file for your Node.js project, describing your project and its dependencies
name: the name of current project
version: version: The current version of your project
keywords: A string array that defines your project. This is useful for searching within npm repositories.
author: the name of writing the package
how to make package.json
1
2
npm init
npm init -y
-y: Generate it without having it ask any questions