Last active
August 29, 2015 14:20
-
-
Save ada-lovecraft/c85b74887340f5a7b61e to your computer and use it in GitHub Desktop.
How to heroku
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var port = process.env.PORT || 5000; | |
.... | |
app.listen(port, function() { | |
console.log("Listening on " + port); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create this file in your project root | |
web: node <entry point file here> | |
EXAMPLE: | |
web: node app.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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