refator: move lifecycle middleware to root http

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-12-04 17:57:45 +01:00
parent 7ad9d1a0ee
commit ad39962dc9
11 changed files with 365 additions and 17 deletions
+13
View File
@@ -28,6 +28,19 @@ export interface Config {
*/
baseUrl: string;
lifecycle?: {
/**
* The maximum time that paused requests will wait for the service to start, before returning an error.
* Defaults to 5 seconds.
*/
startupRequestPauseTimeout?: HumanDuration;
/**
* The maximum time that the server will wait for stop accepting traffic, before returning an error.
* Defaults to 30 seconds.
*/
shutdownRequestPauseTimeout?: HumanDuration;
};
/** Address that the backend should listen to. */
listen?:
| string