Closed bengourley closed 9 years ago
Also why does it have an exit code of 1
? From little poke around exit codes when triggering shutdown by signals, 0
would be fine…?
Also moved rewire to devDependencies
.
Regarding:
https://github.com/serby/express-graceful-shutdown/blob/master/index.js#L25
It is because the shutdown didn't complete as expected and something more drastic was needed.
Thanks.
I meant this line: https://github.com/serby/express-graceful-shutdown/blob/master/index.js#L18
Again that is unexpected in production so I deemed it as such.
In development (when you don't pass
NODE_ENV=something
on the command line) it isundefined
, but this module is checking for''
, meaning that it does the graceful shutdown behaviour even in development.In this PR I added a failing test which subsequently passed after making the code change.