[筆記] Deploy Mojito app to Heroku

Reading time ~1 minute

First, you need to follow this doc (http://developer.yahoo.com/cocktails/mojito/docs/quickstart/) to install Mojito as a global node module. Why install it globally? Because you need the Mojito command line to create your first app.

Create application with command line:

mojito create app mymojito

Change working directory to “mymojito”.

Create a “Procfile” whose content is:

web: mojito start $PORT

Use the following command to create an application on heroku and deploy codes to it.

  • git init
  • git add .
  • git commit -am init
  • heroku create mymojitotest –stack cedar
  • git push heroku master

After successfully commit codes to heroku, you could check running process with “heroku ps”. However, you cannot find any running process. That is because there is one important step missed:

heroku ps:scale web=1

This command adds one dyno for web process. After that, you will find one web process when you check with “heroku ps”. And the server is now started up. You can check your app with browser.

[筆記][node.js] 使用nvm安裝查克拉版的node.js

從[nodejs 8](https://nodejs.org/en/blog/release/v8.0.0/)開始, nodejs可以不再需要一定跟V8綁在一起了, 之後底層的Engine可以換成微軟的[查克拉](https://github.com/Microsoft/C...… Continue reading