http-server
http-server copied to clipboard
Add graceful shutdown and error handling
This PR adds handling for fatal crashes of any type. Just so you don't have to see a giant error stack on your console.
The feature is turned on by the --no-panic
option or by the environment variable NODE_HTTP_SERVER_NO_PANIC.
The output is something like:
Relevant issues
Refers partly to #665
What needs to be done:
- [x] Add switch.
- [x] Better log file (JSON formatting)
Contributor checklist
- [x] Provide tests for the changes (unless documentation-only)
- [x] Documented any new features, CLI switches, etc. (if applicable)
- [x] Server
--help
output - [x] README.md
- [x] doc/http-server.1 (use the same format as other entries)
- [x] Server
- [x] The pull request is being made against the
master
branch
Maintainer checklist
- [ ] Assign a version triage tag
- [ ] Approve tests if applicable
Ready for review.