Reputation:
is there any way to create NPM package for SailsJs models, controllers and config files.
Upvotes: 0
Views: 149
Reputation: 1621
If you created project locally and installed all packages with
npm install PACKAGENAME --save
it added it to package.json which is your node.js config file. There are all dependencies. Only missing part is your code now. It should be in repository. You can modify package.json to include download it also with when you execute 'npm install'. Just add:
"repository" :
{ "type" : "git"
, "url" : "https://github.com/npm/npm.git"
}
To read more about package.json click here
Later you just need to upload your package.json to server and execute npm install.
Upvotes: 1