var app = require('express')();
var http = require('http').Server(app);
app.use(modRewrite([
'^/test$ /index.html',
'^/test/\\d*$ /index.html [L]',
'^/test/\\d*/\\d*$ /flag.html [L]'
]));
app.get('/index.html', function(req, res){
res.sendfile('index.html');
});
http.listen(3000, function(){
console.log('listening for clients on *:3000');
});
|