Skip to content

Instantly share code, notes, and snippets.

@ccjeng
Last active August 29, 2015 14:00
Show Gist options
  • Save ccjeng/11284024 to your computer and use it in GitHub Desktop.
Save ccjeng/11284024 to your computer and use it in GitHub Desktop.
heroku nodejs deployment
git init
## git link to github repo
## git remote add origin [email protected]:ccjeng/tptrash-api.git
git add .
# commit program to local git repo
git commit –m "First commit"
# create app on heroku
heroku create <app name>
# deploy to heroku by force
git push heroku master -f
# start app
heroku ps:scale web=1
# stop app
heroku ps:scale web=0
### remove
# remove local git repo
rm -rf .git
# remove remote heroku git repo
heroku remote -remove <repo name>
## push change to github
git add .
git commit -f "change"
git push origin master -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment