Lab 2.1 Deploy sails app to Heroku from Github

In Continuous Integration, we would like to automate the deployment. Follow this practice, we are maintaining a working product, adding new features in it everyday.

There are several Cloud Service providers supporting Node.js application. For example, you could run Sails on Google App Engine and IBM Bluemix. Today, we are going to deploy your Sails app to Heroku via Github.

Heroku

enter image description here

Heroku is a Platform As a Service (PaaS) provider, which could also run our Sails app on cloud. Let’s sign up for an account on Heroku (in case you haven’t), or sign in with your account. |Sign up|Log in| |—-|—-| | enter image description here| enter image description here|

After you have logged in, this page would list out all your apps. Please click on Create new app to create your first app on Heroku.

enter image description here

Create a new app

You need to input a name for your app in App name. It will become the first part of domain name for your app. For example. if you input kennycheng, the domain name for your app would be https://kennycheng.herokuapp.com/.

enter image description here

Deploy with Github

Let’s deploy the Sails project from Github to Heroku. Please click on Github in Deployment method, then click on the Connect to Github button on below.

enter image description here

It would ask you to authorize Heroku for accessing your Github account. After connected to your Github account, you could search the repository and connect it to Heroku.

enter image description here

Automatic deploys

You could enable Automatic deploy by clicking on Enable Automatic Deploys button. Once you have commit pushed to the master branch, it will deploy on Heroku automatically.

enter image description here