mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
framework for reloading
This commit is contained in:
@@ -28,6 +28,11 @@ var async = require('async'),
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Meta.reload = function(step) {
|
||||||
|
// 1. Reload plugins and associated routes
|
||||||
|
// 2. Minify scripts and css, update cache buster
|
||||||
|
};
|
||||||
|
|
||||||
Meta.restart = function() {
|
Meta.restart = function() {
|
||||||
if (process.send) {
|
if (process.send) {
|
||||||
process.send({
|
process.send({
|
||||||
|
|||||||
@@ -57,9 +57,5 @@ module.exports = function(app, middleware, controllers) {
|
|||||||
|
|
||||||
router.get('/test', function(req, res) {
|
router.get('/test', function(req, res) {
|
||||||
res.redirect(404);
|
res.redirect(404);
|
||||||
var plugins = require('../plugins');
|
|
||||||
plugins.reloadRoutes(function() {
|
|
||||||
res.send(200, 'routes replaced');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user