Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Express 3 has no "app.close()" #1366
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:
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.
Yes express is really a listener to http request events now which means you can do this:
var app = express();
On Oct 13, 2012, at 1:38 AM, Glynn Bird email@example.com wrote:
So the final full code example for cleaning up resources in Express 3 would be the following?: