Skip to content

Instantly share code, notes, and snippets.

@BenJam
Created September 10, 2010 10:01
Show Gist options
  • Save BenJam/573404 to your computer and use it in GitHub Desktop.
Save BenJam/573404 to your computer and use it in GitHub Desktop.
require.paths.unshift('../../express.js/lib')
require('express')
require('express/plugins')
configure(function(){
use(Logger);
use(Static);
set('root',__dirname);
});
get('/', function(file){
this.redirect('/index.html');
});
get('/:file.html', function(file){
this.sendfile(__dirname + '/public/'+file+'.html');
}
);
get('/style.css', function(file){
this.sendfile(__dirname + '/public/style.css');
}
);
run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment