https://scotch.io/tutorials/how-to-deploy-a-node-js-app-to-heroku
In sum:
Run once:
- git clone https://github.com/AAA/BBB.git & cd BBB(if required)
- if start from scratch, run "git init"
- heroku login
- heroku create
- heroku ps:scale web=1 (optional?)
Run as you change code / debug:
- git add .
- git commit -m "MMM"
- git push heroku master
- heroku open (for viewing the results remotely)
- foreman start (for starting local server with .env settings; don't run node directly)
Restart server:
heroku restart
沒有留言:
張貼留言