Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graceful-shutdown

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graceful-shutdown

Gracefully shutdown a server upon receiving the specified signal(s)

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

#graceful-shutdown

Shuts down an HTTP{s}Server gracefully upon the first specified signal received by the process and executes the optional callback.

example

var gracefullyShutdown = require('graceful-shutdown');

var server = http.createServer();

gracefullyShutdown(server).upon('SIGINT SIGTERM').finally(function() {
  console.log('I am an optional callback');
  console.log('server#close() has been called');
});

install

> npm install graceful-shutdown

License

MIT

FAQs

Package last updated on 12 Dec 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc