Awesome Node.js development environment with Heroku and Cloud9

As we know,Heroku enables developers to build and run Node.js apps on it,and the most important,it is FREE.
Today I will try to setup an awesome Node.js development environment and deployment with Cloud9 and Heroku.

Of course, we need to sign up first.

1.Sign up


2.Create a new App in heroku

Create a new App with an unique App name such as “myapp”,then we will have a public domain : heroku-1 heroku-2 heroku-3

3.Create a new Node.js Workspace in Cloud9

Cloud9 Workspace node dev   Cloud9

4.Remove unuseful libraries via Console

node dev Cloud9 uninstall

5.Edit the main script file

Change “server.js” to “app.js” with the following source code.

6.Edit package.json

The Heroku Node.js buildpack is employed when the application has either a package.json file or a server.js file in the root directory.
Edit “package.json” file with the following source code.

7.Create Procfile file

The command in Procfile that will be executed when a dyno is started.
Create “Procfile” file with the following source code.


The last work, Deploy the whole files to Heroku via Console. node dev  Cloud9 resources
The message “Verifying deploy…. done.” will be shown if the Deploy is done,
then we can see the “Hello World” from the public domain heroku Hello World I will share you more infomation about Node.js and Heroku in the next posts,
Enjoy it!

Related Post

Build LINE Bot web application with Node.js and He... Overview In order to check the operation of the LINE Bot web application that using the LINE Messaging API, you need a server that can be accessed externally.This post shares the creation procedure of LineBot web application using Heroku. Basic flow 1. Heroku development environment For web onli...
Write Apex Test Classes efficiently with Tesforce 1.Why Tesforce The Test Classes are required to deploy Apex to a production environment or to be packaged and placed on AppExchange, it must provide at least 75% code coverage. That will be a huge workload to SFDC Developers if the project(application) include a lot of Apex Classes,the...
Synchronize data between Postgres and Salesforce v... Somtimes we need to built a Web App with standard open source stacks, like PHP, Node.js and Python,but manage and analytic data with Salesforce standard functions,like record CRUD,views and reports. Heroku Connect provides us a pretty simple solution for this case, that using bi-directional syn...
Write a Heroku Scheduler batch for MangoDB+Salesfo... In previous post,I had shared how to 《Access Salesforce data via APIs(JSForce) from Outside Service》. In this post I will share about how to write a Heroku Scheduler batch for synchronizing MangoDB data to Salesforce with Node.js, like the below outline picture. ※I have no doubt that there hav...

Post Tagged with , , ,