Awesome Node.js development environment with Heroku and Cloud9
- Jun
- 18
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.
2.https://www.heroku.com
Edit “package.json” file with the following source code.
Create “Procfile” file with the following source code.
then we can see the “Hello World” from the public domain https://myapp.herokuapp.com. I will share you more infomation about Node.js and Heroku in the next posts,
Enjoy it!
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
1.https://c9.io/2.https://www.heroku.com
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 : https://myapp.herokuapp.com.3.Create a new Node.js Workspace in Cloud9
4.Remove unuseful libraries via Console
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.
8.Deploy
The last work, Deploy the whole files to Heroku via Console. The message “Verifying deploy…. done.” will be shown if the Deploy is done,then we can see the “Hello World” from the public domain https://myapp.herokuapp.com. I will share you more infomation about Node.js and Heroku in the next posts,
Enjoy it!
Recent Posts
- Salesforce DevTools Release Notes (version 3.10.0) – mass edit custom fields on lightning
- Salesforce DevTools Release Notes (version 3.9.0) – Object Fields, SOQL Query Editor
- Salesforce DevTools Release Notes (version 3.8.0)
- Salesforce DevTools JUST HIT 10,000 USERS! THANK YOU!
- Using Promise for Apex Server-Side request in Lightning Component
Top Posts
- Salesforce DevTools – Powerful Salesforce developer tools, loved by over 50K developers - 219.6K views
- Date format and DateTime format - 204K views
- Salesforce Mass Editor (Chrome Extension) – Mass create, mass update, mass clone, mass delete on any list view. Support for both Classic and Lightning! - 158.4K views
- Setup an awesome Salesforce developer environment with Sublime Text 3 - 122.3K views
- Writing a Schedulable Batch Apex in Salesforce - 118.8K views
Categories
- APEX
- Apps
- Custom Label
- Custom Metadata
- Custom Setting
- Design & UI
- Event
- Heroku
- iOS & Object-c
- Lightnint Component
- Linux & Mac OS
- Metadata API
- Node.js
- Open Source
- Other
- PHP Framework
- Release Notes
- REST API
- Salesforce
- Salesforce DevTools
- Salesforce DX
- SOQL
- Tooling API
- Unit Tests
- Validation Rule
- Visualforce
- WordPress
You must be logged in to post a comment.