Publishing a Node.js Packaged Module to the NPM Registry
NPM Registry is the best way to share your Module and is very simple just follow the next steps:
Create a public repository to contain the code for the module. I usually useĀ GitHub
Modify theĀ package.jsonĀ to include the new repository informationĀ
"repository": { Ā Ā Ā "type":"git", Ā Ā Ā "url":"http://github.com/user/repo-name" }, ...
Create an account atĀ NPM
Use theĀ npm adduserĀ command in your local terminal and inside the project path
Type in the username, password and email that you register in step 2Ā
Inside the project folder path use theĀ npm publishĀ command to Publish
Now that you publish your Node.js module and you can search it in the NPM registry.
If by any case you wish to remove your Module from the NPM registry you can do so with theĀ npm unpublish <project name> --forceĀ command lineĀ












