Creating and registering a Node Package Module

Full stack 3.2 : FX-price-service Node Package Module

Setting up and defining a node package

Preparing an npm package

Writing a specification

npm init
{
“name”: “gch-truefx-pricefeed”,
“main”: “index”,
“version”: “0.0.1",
“description”: “FX price service “,
“homepage”: “https://github.com/Goochie/gch-truefx-pricefeed",
“keywords”: [ “websocket”,“socket”,“FX”,“socket.io”],
“dependencies”: {
“socket.io”: “~0.9.16",
“cheerio”: “^0.17.0",
“request”: “^2.36.0"
},
"repository": {
"type": "git",
"url": "https://github.com/Goochie/gch-truefx-pricefeed"
}
}
“main”: “index”,
/**
* Author : Bill Gooch
* MIT Licensed
*/
module.exports = require(‘./lib/fxprice-srv’);

Testing a package

npm link
npm link gch-truefx-pricefeed
npm link mypackage
npm unlink gch-truefx-pricefeed

Publishing a package

npm adduser
npm publish

Conclusion

--

--

Bill Gooch
HTML5 RIA full stack

Full Stack Architect Node, AngularJS, Javascript, HTML5, CSS