0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server/middleware/maintenance.js
Katharina Irrgang 748c664b78 feature: maintenance mode (#7019)
closes #6976
- add maintenance mode when running migrations
- refactor update/populate migrations
2016-07-15 17:22:41 +01:00

10 lines
265 B
JavaScript

var config = require(__dirname + '/../config'),
errors = require(config.paths.corePath + '/server/errors');
module.exports = function (req, res, next) {
if (config.maintenance.enabled) {
return next(new errors.Maintenance());
}
next();
};