mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-01-23 18:55:21 +00:00
* `src/node/server.js` can now be run as a script (for normal
operation) or imported as a module (for tests).
* Move shutdown actions to `src/node/server.js` to be close to the
startup actions.
* Put startup and shutdown in functions so that tests can call them.
* Use `await` instead of callbacks.
* Block until the HTTP server is listening to avoid races during
test startup.
* Add a new `shutdown` hook.
* Use the `shutdown` hook to:
* close the HTTP server
* call `end()` on the stats collection to cancel its timers
* call `terminate()` on the Threads.Pool to stop the workers
* Exit with exit code 0 (instead of 1) on SIGTERM.
* Export the HTTP server so that tests can get the HTTP server's
port via `server.address().port` when `settings.port` is 0.
|
||
|---|---|---|
| .. | ||
| api | ||
| assets | ||
| easysync | ||
| images | ||
| cookies.md | ||
| database.md | ||
| docker.md | ||
| documentation.md | ||
| index.md | ||
| localization.md | ||
| plugins.md | ||
| skins.md | ||
| stats.md | ||
| template.html | ||