3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

fix express close for 3.0. you could document your shit guys

This commit is contained in:
reality 2013-01-05 01:36:36 +00:00
parent aa39fd7d4c
commit 91ba685401

View File

@ -11,9 +11,8 @@ var webInterface = function(dbot) {
app.get('/', function(req, res) {
res.render('index', { 'name': dbot.config.name });
});
app.listen(dbot.config.web.webPort);
var server = app.listen(dbot.config.web.webPort);
var reloadPages = function(pages) {
for(var p in pages) {
@ -40,7 +39,7 @@ var webInterface = function(dbot) {
'reloadPages': reloadPages,
'onDestroy': function() {
app.close();
server.close();
}
};
};