binki / autoserve

Deploy a node webapp to FastCGI, Passenger, node http, or other things in the future
Other
1 stars 0 forks source link

Have controller object and cleanup API #8

Open binki opened 7 years ago

binki commented 7 years ago

The autoserve() function should return an object which can be used to control the server and, particularly, allow for cleanly exiting (disable accepting new requests while continuing to serve existing ones and exiting after the last client exits in such a way that a parallel instance of the service could be created to, e.g., enable graceful restart). Add tests for this scenario too.