
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@sigfox/koa-maintenance
Advanced tools
Koa middleware to manage maintenance mode.
You can use this module if you need to manage the maintenance mode of your Koa app.
Switch on or off at startup the maintenance mode of your Koa app, if on it will send a 503 status to all incoming requests, if off it will go through the maintenance middleware without modifications of the incoming request. The HTTP status code and the body's response can be customised via the options
parameter.
npm install @sigfox/koa-maintenance
isOn
(Boolean
) (default: "false"
): The flag to indicate if the maintenance is on or off, default is off.options
(Object
) (default
: "{ status: 503, message: "We are currently down for maintenance." }"): The options to customise status code and body's response.const Koa = require('koa');
const maintenance = require('@sigfox/koa-maintenance');
const app = new Koa();
app.use(
maintenance(process.env.MAINTENANCE === 'true', {
status: 503,
message: 'Something amazing is coming, bear with us'
})
);
const server = app.listen();
npm test
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Koa middleware to manage maintenance.
The npm package @sigfox/koa-maintenance receives a total of 2 weekly downloads. As such, @sigfox/koa-maintenance popularity was classified as not popular.
We found that @sigfox/koa-maintenance demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.