2015年6月7日 星期日

JS workflow on heroku

http://www.sitepoint.com/deploying-camel-js-blog-heroku/

https://scotch.io/tutorials/how-to-deploy-a-node-js-app-to-heroku

In sum:

Run once:

  1. git clone https://github.com/AAA/BBB.git & cd BBB(if required)
    1. if start from scratch, run "git init"
  2. heroku login 
  3. heroku create
  4. heroku ps:scale web=1 (optional?)
Run as you change code / debug:
  1. git add .
  2. git commit -m "MMM"
  3. git push heroku master 
  4. heroku open (for viewing the results remotely)
  5. foreman start (for starting local server with .env settings; don't run node directly)
Restart server:

heroku restart


沒有留言:

張貼留言