Small bash program that
- Logs into a remote server
- Sets up a git repo you can push to
- Adds a post-receive hook that runs npm install and more
- Adds the remote repo as a deploy remote locally
npm install -g git-push-deploy
cd some-cool-repo git-push-deploy email@example.com
Then after adding a
start-service script to package.json you can deploy your service
git push deploy master
When receiving a push the remote repo does the following
npm run stop-service
- Updates the remote checkout and cleans the repo.
npm install --production
npm run one-time-setup. This is only run once unless you change the script.
npm run start-service
start-service script should make the application start running in the background and the
stop-service script should make that background process stop running.
Thats it! Happy deploying!