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

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 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...
Access Salesforce data via APIs(JSForce) from Outs... At previous post,I had shared you how to setup an 《Awesome Node.js development environment with Heroku and Cloud9》. Today I will continue to share about how to access Salesforce data via APIs from Outside Service. JSforce JSforce (f.k.a. Node-Salesforce) is a isomorphic JavaScript Library utilizi...
Encrypte & Decrypte string in Node.js I have tried to encrypte and decrypte string in Node.js recently. There has many code examples at Internet, eg: Reference: Run it in console commond but the following error has occurred. https://gis...

Post Tagged with , , ,