hof 22.7.0-service-paused-beta.4 → 22.7.0-service-paused-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -51,6 +51,12 @@ const loadRoutes = (app, config) => {
|
|
51
51
|
};
|
52
52
|
|
53
53
|
const applyErrorMiddlewares = (app, config) => {
|
54
|
+
if (config.servicePaused === true || config.servicePaused === 'true') {
|
55
|
+
app.use(hofMiddleware.servicePaused({
|
56
|
+
logger: config.logger
|
57
|
+
}));
|
58
|
+
}
|
59
|
+
|
54
60
|
app.use(hofMiddleware.notFound({
|
55
61
|
logger: config.logger
|
56
62
|
}));
|
@@ -240,7 +246,6 @@ function bootstrap(options) {
|
|
240
246
|
}
|
241
247
|
next();
|
242
248
|
});
|
243
|
-
app.use('/service-paused', hofMiddleware.servicePaused());
|
244
249
|
};
|
245
250
|
|
246
251
|
|