5. Setup SSH Key in Bitbucket and
Heroku
Create RSA SSH Key from Eclipse.
Save that key in BitBucket as well as Heroku.
Explained in article link provided in next slides.
6. Introduction to EGit
Check this article :
http://www.shivasoft.in/blog/salesforce/salesforce-git-
eclipse-egit-better-and-distributed-source-control/
7. Introduction to Heroku Plugin
Check this –
http://www.shivasoft.in/blog/java/creating-first-
application-in-heroku-using-eclipse/
8. Creating Blank Heroku Application
In Eclipse, Click on Create New Project
And select Heroku, assuming you have already
installed Heroku plugin in Eclipse.
Refer article explained in starting of this presentation
9. Create sample Node.js startup File
Create Web.js file with following code
var express = require("express");
var logfmt = require("logfmt");
var app = express();
app.use(logfmt.requestLogger());
app.get('/', function(req, res) {
res.send('Hello World!');
});
var port = Number(process.env.PORT || 5000);
app.listen(port, function() {
console.log("Listening on " + port);
});
10. Create Package.json
Open root application path in console
Run “npm init” command and provide all information
Now run below command
npm install express logfmt --save
14. Assign Dyno to your application
A dyno is a lightweight container running a single
user-specified command
Assign 1 Dyno to your Heroku application which is free
15. How to check logs on Heroku
Navigate to your Node.js application folder and run
below command :
Heroku logs