dbot/modules/web.js

30 lines
590 B
JavaScript
Raw Normal View History

2011-09-13 21:23:46 +01:00
var express = require('express');
var webInterface = function(dbot) {
var dbot = dbot;
2011-09-13 21:55:20 +01:00
var pub = '../public';
var app = express.createServer();
app.use(express.compiler({ src: pub, enable: ['sass'] }));
app.use(express.static(pub));
app.set('view engine', 'jade');
2011-09-13 21:23:46 +01:00
app.get('/', function(req, res) {
res.render('index', { });
2011-09-13 22:03:02 +01:00
console.log('test');
2011-09-13 21:23:46 +01:00
});
app.listen(1337);
2011-09-14 17:24:32 +01:00
return {
'onDestroy': function() {
process.exit();
}
};
2011-09-13 21:23:46 +01:00
};
exports.fetch = function(dbot) {
return webInterface(dbot);
};