Skip to content

Instantly share code, notes, and snippets.

@olalonde
Created October 1, 2012 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olalonde/3810362 to your computer and use it in GitHub Desktop.
Save olalonde/3810362 to your computer and use it in GitHub Desktop.
var express = require('express');
app.configure(function(){
var cwd = process.cwd();
app.use(express.static(cwd + '/public', {maxAge: 86400000}));
app.set('view engine', 'ejs');
app.set('view options', {complexNames: true});
app.set('jsDirectory', '/javascripts/');
app.set('cssDirectory', '/stylesheets/');
app.use(express.bodyParser());
app.use(express.cookieParser('secret'));
app.use(express.session({secret: 'secret'}));
app.use(express.methodOverride());
app.use(app.router);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment