Skip to content

Instantly share code, notes, and snippets.

@jgatjens
Created March 12, 2013 17:59
Show Gist options
  • Save jgatjens/5145268 to your computer and use it in GitHub Desktop.
Save jgatjens/5145268 to your computer and use it in GitHub Desktop.
Nodejs - Static File Server
var express = require(' express');
var app = express();
app.configure(function() {
app.set(' view engine', 'jade');
app.use(express.static(__dirname + '/ public'));
});
app.get('/', function(req, res) {
res.render(" index.jade", {
layout: false
});
});
app.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment