Skip to content
Latest commit 9ade163 Zack Brunson Converting forky to take an options object instead of 3 arguments (ma…
…intaining backwards compatibility). Also adds options for enabling logging and changing the default kill timeout
Failed to load latest commit information.



Read server.js for some reference implementations on how to do various things with forky and the cluster module.

install & run

clone the repo npm install node examples/master


You can hit routes to cause the server to do various production-style errors and disconnections. Try it out with cURL.

Just get a 200 response with the id of the worker curl http://localhost:8485/

Tell the worker to disconnect gracefully curl http://localhost:8485/disconnect

Tell the worker to disconnect graefully and for an exit after a timeout curl http://localhost:8485/disconnect/10000

Tell the worker to process.exit() curl http://localhost:8485/exit

Tell the worker to throw an error (handled by the domain middleware) curl http://localhost:8485/crash

Something went wrong with that request. Please try again.