var express = require('express'), routes = require('./routes'), http = require('http'), redis = require('redis'), app = express(); app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use(express.static(__dirname + '/public')); app.use(express.bodyParser()); app.use(function(req, res, next) { redis.createClient().set('max', 10, function() {next();}); }); app.use(app.router); app.use(function(err, req, res, next) { console.log(err.stack); res.send(500, '

Internal Server Error

'); }); app.get('/', routes.index); app.post('/book', routes.book); app.post('/checkin', routes.checkin); app.post('/checkout', routes.checkout); app.post('/reset', routes.reset); app.listen(3003);