JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 181823
  • Score
    100M100P100Q178776F
  • License MIT

Exit your process, gracefully (if possible)

Package Exports

  • close-with-grace

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (close-with-grace) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

close-with-grace

Exit your process, gracefully (if possible) - for Node.js

Install

npm i close-with-grace

Usage

const closeWithGrace = require('close-with-grace')

// delay is the number of milliseconds for the graceful close to
// finish.
closeWithGrace({ delay: 500 }, async function ({ signal, err, manual }) {
  await closeYourServer()
  if (err) {
    console.error(err)
  }
})

Docs

to be continued..

License

MIT