Created
November 13, 2013 20:06
-
-
Save tastywheat/7455483 to your computer and use it in GitHub Desktop.
nodejs express webserver
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 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