This is short note about fast creation, publishing & using Node.js module via using Command Line Interface.
- Use
npm init
to create package.json. - Run
npm install
to install dependency and save it to package.json.--save
When the code in the foo package does
require('bar')
, it will be loaded either foo/node_modules/bar or from core modules if it was installed as a global module via nmp install -g
command.
This is very great article it's inspiring for so many people. Thank you for sharing such a great article.
ReplyDeleteNode JS Online training
Node JS training in Hyderabad