How to use the express-graceful-exit.init function in express-graceful-exit

To help you get started, we’ve selected a few express-graceful-exit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tanghuibo / eazy-proxy / serve / libs / proxy.js View on Github external
function closeServer(server, app) {
  gracefulExit.init(server);
  app.use(gracefulExit.middleware(app));
  gracefulExit.gracefulExitHandler(app, server, {
    exitProcess: false
  });
}
github michaelBenin / react-ssr-spa / src / server / services / express_service.js View on Github external
export const createOrGetServer = () => {
  if (!server) {
    server = http.createServer(app);
    expressGracefulExit.init(server);
  }
  return server;
};

express-graceful-exit

Allow graceful exits for express apps, supporting zero downtime deploys

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis