Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@ladjs/graceful
Advanced tools
Gracefully exit server (Koa), database (Mongo/Mongoose), Bree job schedulers, Bull job schedulers, and custom handlers.
Gracefully exit server (Koa), database (Mongo/Mongoose), Redis clients, Bree job schedulers, Bull job schedulers, and custom handlers.
npm:
npm install @ladjs/graceful
yarn:
yarn add @ladjs/graceful
Using this package will bind process event listeners when graceful.listen()
is called:
process.on('warning')
- will output via config.logger.warn
process.on('unhandledRejection')
- will output via config.logger.error
process.once('uncaughtException')
- will output via config.logger.error
and process.exit(1)
(does not exit gracefully)process.on('message')
- support Windows (e.g. signals not available) and listen for message of shutdown
and then exit gracefullyprocess.once('SIGTERM')
- will exit gracefullyprocess.once('SIGHUP')
- will exit gracefullyprocess.once('SIGINT')
- will exit gracefullyprocess.once('SIGUSR2')
- will exit gracefully (nodemon support)This package also prevents multiple process/SIG events from triggering multiple graceful exits. Only one graceful exit can occur at a time.
See one of these following files from Lad for the most up to date usage example:
You can also read more about Bree at https://github.com/breejs/bree.
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com/ |
Felix Mosheev | https://github.com/felixmosh |
Nicholai Nissen | https://nicholai.dev |
FAQs
Gracefully exit HTTP servers (Express/Koa/Fastify/etc), databases (Mongo/Mongoose), Bree job schedulers, and custom handlers.
The npm package @ladjs/graceful receives a total of 4,641 weekly downloads. As such, @ladjs/graceful popularity was classified as popular.
We found that @ladjs/graceful demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.