Skip to content

Instantly share code, notes, and snippets.

View motdotla's full-sized avatar
🏆

Mot motdotla

🏆
View GitHub Profile
@motdotla
motdotla / setup-statsd.sh
Created June 16, 2012 18:17 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
Start here:
http://warwickp.com/2012/03/vagrant-box-with-graphite-statsd-gdash-nginx
$ git commit -am "Set port to use Heroku's randomly granted port."
@motdotla
motdotla / app.coffee
Created June 6, 2012 20:29
We updated the port to use the Heroku's environment port.
express = require("express")
app = express.createServer()
app.configure ->
app.set 'views', __dirname + "/views"
app.use express.bodyParser()
app.use express.static(__dirname + "/public")
app.get '/', (req, res) ->
res.render 'index.jade'
$ heroku config:add NODE_ENV=production
$ heroku ps:scale web=1
$ git push heroku master
$ git add .
$ git commit -am "Added Procfile for heroku and specified node version"
@motdotla
motdotla / package.json
Created June 6, 2012 20:18
Heroku needs to know the node.js version.
{ ..
"engines": {
"node": "0.6.12",
"npm": "1.1.4"
},
..
}
@motdotla
motdotla / Procfile
Created June 6, 2012 20:16
Heroku needs this as instruction to run your app.
web: coffee app.coffee
@motdotla
motdotla / gist:2884293
Created June 6, 2012 19:51
committing your app to git
$ git init
$ touch .gitignore
$ echo "node_modules/" > .gitignore
$ git add .
$ git status
$ git commit -am "initial commit"
@motdotla
motdotla / index.jade
Created June 3, 2012 23:52
Index.jade will act as our home page file (our index file). From here we can link to other pages as the page develops.
h1 Hello Express w/ Jade!