Skip to content

Instantly share code, notes, and snippets.

@matthewhudson
Created February 8, 2012 20:10
Show Gist options
  • Save matthewhudson/1772934 to your computer and use it in GitHub Desktop.
Save matthewhudson/1772934 to your computer and use it in GitHub Desktop.
Deploy Node.js to Heroku
# Create the app on the Cedar stack using a custom buildpack:
heroku create --stack cedar --buildpack http://github.com/heroku/heroku-buildpack-nodejs.git
# Creating sharp-rain-871... done, stack is cedar
# http://sharp-rain-871.herokuapp.com/ | [email protected]:sharp-rain-871.git
# Git remote heroku added
# Rename the application.
heroku rename newname
git push heroku master
# Before looking at the app on the web, we’ll need to scale the web process:
heroku ps:scale web=1
# Scaling web processes... done, now running 1
# Add NODE_ENV environment var for expressjs
heroku config:add NODE_ENV=production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment