Skip to content

Express 3 has no "app.close()" #1366

Description

@glynnbird

Imagine you want to be able to terminate your Node.js app and drain all existing connections before quitting, you might come up with a solution as outlined here:

http://blog.argteam.com/coding/hardening-node-js-for-production-part-3-zero-downtime-deployments-with-nginx

e.g.

  • respond to SIGTERM or SIGINT events
  • tell your Express app to stop accepting new connections
  • get called back by Express when the last connection has been serviced

This would all you to do graceful deployments of new code without terminating existing requests (assuming your load balancer sends traffic to other servers).

As of Express 3, the app.close() method seems to have disappeared, which means Express users have no means of gracefully stopping an application as far as I can see.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions