Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (21 sloc) 641 Bytes
#!/usr/bin/env node
var connect = require('connect'),
io = require('socket.io'),
db = new (require('./lib/db/mongodb'))({
server: '127.0.0.1',
port: 27017
}),
route_api = require('./lib/routes/api'),
route_user = require('./lib/routes/user');
var server = connect.createServer(
connect.bodyDecoder(),
connect.cookieDecoder(),
connect.methodOverride(),
connect.compiler({src: __dirname + '/../pub', enable: ['less'] }),
connect.session(),
connect.router(route_user(db)),
connect.router(route_api(db)),
connect.cache(),
connect.staticProvider(__dirname + '/../pub')
);
server.listen(8080);