Skip to content

Instantly share code, notes, and snippets.

@tastywheat
Created November 13, 2013 20:06
Show Gist options
  • Save tastywheat/7455483 to your computer and use it in GitHub Desktop.
Save tastywheat/7455483 to your computer and use it in GitHub Desktop.
nodejs express webserver
var express = require('express');
var app = express();
var oneDay = 0;//86400000;
app.configure(function(){
app.use(express.compress());
app.use(express.static(__dirname + '/public', { maxAge: oneDay }));
app.use(express.bodyParser());
app.use(express.cookieParser('some secret'));
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment