The package.json is important for publish an app on Bluemix
Here is a sample of a package.json, you should have something like that but with differents dependencies.
When you install a package with npm use "--save"
ex: "npm install stripe --save" automatically save the dependency in the package.json
{
"name": "myApp",
"version": "0.0.2",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"start": "node app.js"
},
"dependencies": {
"stripe": "~2.5.3",
"cors": "~2.3.1",
"express": "~4.2.0",
"body-parser": "~1.2.0",
"email-templates": "~0.1.8",
"nodemailer": "~0.6.5",
"moment": "~2.6.0"
}
}
the command following just upload you app on bluemix:
cf push myApp --no-manifest --no-start -c "node app.js"the command following read you package.json, install al the dependencies, and then start your App, so if you forget one you will not be able to start the app:
cf start myApp