Miss any of our Open RFC calls?Watch the recordings here! »

pre-exit

1.0.0 • Public • Published

pre-exit

NPM Travis Codecov Greenkeeper badge David David Dev

Clean up before you exit.

Installing

# npm 
npm install -s pre-exit
 
# yarn 
yarn add pre-exit

Usage

This package will listen on

import preExit from 'pre-exit'
 
// If there's an HTTP(S) server listening (assume that's `httpServer`)
// then you probably want to close it down gracefully before shutting down the server
cleanup(function closeServer() {
  return new Promise(resolve => {
    httpServer.close(resolve)
  })
})

Install

npm i pre-exit

DownloadsWeekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.89 kB

Total Files

10

Last publish

Collaborators

  • avatar