mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
fix db meltage. [#191]
This commit is contained in:
parent
82d0362ee3
commit
4f530e5bc6
@ -13,6 +13,17 @@ var webInterface = function(dbot) {
|
|||||||
res.render('index', { 'name': dbot.config.name });
|
res.render('index', { 'name': dbot.config.name });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(Object.keys(app));
|
||||||
|
|
||||||
|
app.configure(function(){
|
||||||
|
app.use(function(err, req, res, next) {
|
||||||
|
console.log('Web encountered an error: ' + err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
app.on('error', function(err) {
|
||||||
|
console.log('Web encountered an error: ' + err);
|
||||||
|
});
|
||||||
|
|
||||||
var server = app.listen(dbot.config.web.webPort);
|
var server = app.listen(dbot.config.web.webPort);
|
||||||
|
|
||||||
this.reloadPages = function() {
|
this.reloadPages = function() {
|
||||||
|
2
run.js
2
run.js
@ -104,7 +104,7 @@ DBot.prototype.t = function(string, formatData) {
|
|||||||
|
|
||||||
// Save the database file
|
// Save the database file
|
||||||
DBot.prototype.save = function() {
|
DBot.prototype.save = function() {
|
||||||
fs.writeFile('db.json', JSON.stringify(this.db, null, ' '));
|
fs.writeFileSync('db.json', JSON.stringify(this.db, null, ' '));
|
||||||
};
|
};
|
||||||
|
|
||||||
// Hot-reload module files.
|
// Hot-reload module files.
|
||||||
|
Loading…
Reference in New Issue
Block a user