issue #478 - hot-swapping of plugins

This commit is contained in:
Julian Lam
2013-11-03 17:15:18 -05:00
parent e480b1bace
commit 4353a9da25
4 changed files with 66 additions and 40 deletions

View File

@@ -151,19 +151,6 @@ var express = require('express'),
},
function(next) {
async.parallel([
function(next) {
// Static Directories for NodeBB Plugins
plugins.ready(function () {
for (d in plugins.staticDirs) {
app.use(nconf.get('relative_path') + '/plugins/' + d, express.static(plugins.staticDirs[d]));
if (process.env.NODE_ENV === 'development') {
winston.info('Static directory routed for plugin: ' + d);
}
}
next();
});
},
function(next) {
// Theme configuration
RDB.hmget('config', 'theme:type', 'theme:id', 'theme:staticDir', 'theme:templates', function(err, themeData) {
@@ -701,6 +688,9 @@ var express = require('express'),
});
});
// Other routes
require('./routes/plugins')(app);
// Debug routes
if (process.env.NODE_ENV === 'development') {
require('./routes/debug')(app);