forked from GitHub/dbot
30 lines
600 B
JavaScript
30 lines
600 B
JavaScript
var express = require('express');
|
|
|
|
var webInterface = function(dbot) {
|
|
var dbot = dbot;
|
|
|
|
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');
|
|
|
|
app.get('/', function(req, res) {
|
|
res.render('index', { });
|
|
});
|
|
|
|
app.listen(1337);
|
|
|
|
return {
|
|
'onDestroy': function() {
|
|
console.log('on destroy');
|
|
process.exit();
|
|
}
|
|
};
|
|
};
|
|
|
|
exports.fetch = function(dbot) {
|
|
return webInterface(dbot);
|
|
};
|