After each deployment through a GitHub webhook, I often end up ssh'ing into my server checking why my app isn't running. Most of the time it's because npm install failed due to weird network issues.
In my package.json I have these scripts at the moment:
"scripts": {
"start": "node ./src/server",
"test": "gulp test",
"deploy": "npm prune && npm install && gulp",
"deploy-dev": "npm run-script deploy && pm2 startOrRestart ./etc/pm2/development.json"
}
I run deploy-dev which runs the deploy script. I want two improvements:
npm install has failed? Is there a command for that?npm install one minute only after it has failed?Thanks for any advice!