All Projects → ladjs → graceful

ladjs / graceful

Licence: MIT License
Gracefully exit server (Koa), database (Mongo/Mongoose), Redis clients, and job scheduler (Redis/Bull)

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to graceful

fine
🧹 Gracefully shutdown Node.js application: help you handle exit signals and cleanup
Stars: ✭ 20 (-45.95%)
Mutual labels:  handler, process, exit, graceful
Kov Blog
A blog platform built with koa,vue and mongoose. 使用 koa ,vue 和 mongo 搭建的博客页面和支持markdown语法的博客编写平台,自动保存草稿。博客地址:https://chuckliu.me
Stars: ✭ 635 (+1616.22%)
Mutual labels:  mongo, koa, mongoose
mongoose-slug-plugin
Slugs for Mongoose with history and i18n support (uses speakingurl by default, but you can use any slug library such as limax, slugify, mollusc, or slugme)
Stars: ✭ 21 (-43.24%)
Mutual labels:  mongo, mongoose, handler
koa-session-mongoose
Mongoose store for Koa sessions
Stars: ✭ 29 (-21.62%)
Mutual labels:  mongo, koa, mongoose
mongoose-morgan
An npm package for saving morgan log inside MongoDB
Stars: ✭ 14 (-62.16%)
Mutual labels:  mongo, mongoose
zenaton-node
⚡ Node.js library to run and orchestrate background jobs with Zenaton Workflow Engine
Stars: ✭ 50 (+35.14%)
Mutual labels:  jobs, process
koa-server
🗄️ GraphQL Back-end Server with Relay, Koa, MongoDB and Mongoose
Stars: ✭ 31 (-16.22%)
Mutual labels:  koa, mongoose
server-next
😎 The next generation of RESTful API service and more for Mix Space, powered by @nestjs.
Stars: ✭ 43 (+16.22%)
Mutual labels:  mongo, mongoose
react-graphql
react-graphql 快速开发方案
Stars: ✭ 15 (-59.46%)
Mutual labels:  koa, mongoose
NodeRestApi
Node.js, Express.js and MongoDB REST API App
Stars: ✭ 38 (+2.7%)
Mutual labels:  mongo, mongoose
mongoolia
Keep your mongoose schemas synced with Algolia
Stars: ✭ 58 (+56.76%)
Mutual labels:  mongo, mongoose
node-express-mongo-passport-jwt-typescript
A Node.js back end web application with REST API, user JWT authentication and MongoDB data storage using TypeScript
Stars: ✭ 51 (+37.84%)
Mutual labels:  mongo, mongoose
uuid-mongodb
📇 Generates and parses MongoDB BSON UUIDs
Stars: ✭ 94 (+154.05%)
Mutual labels:  mongo, mongoose
node-fs
node-fs
Stars: ✭ 55 (+48.65%)
Mutual labels:  koa, mongoose
react-full-stack-starter
🎈Full-stack React boilerplate using `create-react-app`, Babel, Node.js, and express
Stars: ✭ 22 (-40.54%)
Mutual labels:  mongo, mongoose
authentication boilerplate
A Node based Boilerplate for register, login, request password reset password. Using Sengrid to send emails
Stars: ✭ 19 (-48.65%)
Mutual labels:  mongo, mongoose
NodeExpressCRUD
Node, Express, Mongoose and MongoDB CRUD Web Application
Stars: ✭ 45 (+21.62%)
Mutual labels:  mongo, mongoose
blog-backend
前后端分离实践----基于Koa2框架博客后端
Stars: ✭ 54 (+45.95%)
Mutual labels:  koa, mongoose
koa-better-error-handler
A better error-handler for Lad and Koa. Makes `ctx.throw` awesome (best used with koa-404-handler)
Stars: ✭ 51 (+37.84%)
Mutual labels:  koa, handler
NodeScalableArchitecture
A Scalable Node Architecture/Server. This repository contains a complete implementation of writing scalable nodejs server/architecture on my medium blog.
Stars: ✭ 62 (+67.57%)
Mutual labels:  mongo, mongoose

@ladjs/graceful

build status code coverage code style styled with prettier made with lass license

Gracefully exit server (Koa), database (Mongo/Mongoose), Redis clients, Bree job schedulers, Bull job schedulers, and custom handlers.

Table of Contents

Install

npm:

npm install @ladjs/graceful

yarn:

yarn add @ladjs/graceful

Usage

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 gracefully
  • process.once('SIGTERM') - will exit gracefully
  • process.once('SIGHUP') - will exit gracefully
  • process.once('SIGINT') - will exit gracefully
  • process.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.

Contributors

Name Website
Nick Baugh http://niftylettuce.com/
Felix Mosheev https://github.com/felixmosh
Nicholai Nissen https://nicholai.dev

License

MIT © Nick Baugh

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].