Skip to content

Instantly share code, notes, and snippets.

@ada-lovecraft
Last active August 29, 2015 14:20
Show Gist options
  • Save ada-lovecraft/c85b74887340f5a7b61e to your computer and use it in GitHub Desktop.
Save ada-lovecraft/c85b74887340f5a7b61e to your computer and use it in GitHub Desktop.
How to heroku
var port = process.env.PORT || 5000;
....
app.listen(port, function() {
console.log("Listening on " + port);
});
# create this file in your project root
web: node <entry point file here>
EXAMPLE:
web: node app.js
#if you haven't already
# download and install the heroku toolbelt
cd /your/project
# if you don't have git already initiated for the project
$ git init
$ heroku apps:create app-name
#this will create an app on heroku and add a remote called "heroku" to your git
$ git push heroku master
$ heroku ps:scale web=1
# and now you're off!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment