mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
issue #478 - hot-swapping of plugins
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user