Skip to content

Instantly share code, notes, and snippets.

@grantmichaels
Forked from poshaughnessy/app.js
Created May 13, 2012 20:48
Show Gist options
  • Save grantmichaels/2690111 to your computer and use it in GitHub Desktop.
Save grantmichaels/2690111 to your computer and use it in GitHub Desktop.
Simple static site on Heroku with Node.js
var express = require('express');
var port = process.env.PORT || 3000;
var app = express.createServer();
app.get('/', function(request, response) {
response.sendfile(__dirname + '/index.html');
}).configure(function() {
app.use('/images', express.static(__dirname + '/images'));
}).listen(port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment