@trayio/express 4.90.0 → 4.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,6 +4,7 @@ import { ExpressHttpController } from './ExpressHttpController';
|
|
|
4
4
|
interface ExpressServerOptions {
|
|
5
5
|
port?: number;
|
|
6
6
|
shutdownTimeoutMillis?: number;
|
|
7
|
+
shutdownDelayMillis?: number;
|
|
7
8
|
}
|
|
8
9
|
export declare const startServer: (controllers: ExpressHttpController[], options: ExpressServerOptions) => http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
9
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressHttpServer.d.ts","sourceRoot":"","sources":["../../src/http/ExpressHttpServer.ts"],"names":[],"mappings":";AAEA,OAAO,IAAI,GAAG,QAAQ,MAAM,CAAC,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,UAAU,oBAAoB;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpressHttpServer.d.ts","sourceRoot":"","sources":["../../src/http/ExpressHttpServer.ts"],"names":[],"mappings":";AAEA,OAAO,IAAI,GAAG,QAAQ,MAAM,CAAC,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,UAAU,oBAAoB;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,WAAW,gBACV,qBAAqB,EAAE,WAC3B,oBAAoB,yEAyD7B,CAAC"}
|
|
@@ -26,8 +26,11 @@ const startServer = (controllers, options) => {
|
|
|
26
26
|
process.on('SIGTERM', () => {
|
|
27
27
|
console.log('Received kill signal, shutting down gracefully...');
|
|
28
28
|
server.close(() => {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const shutdownDelayMillis = options.shutdownDelayMillis || 500;
|
|
30
|
+
console.log(`Closed out remaining connections. Waiting for shutdown delay of ${shutdownDelayMillis}ms before exiting.`);
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}, shutdownDelayMillis);
|
|
31
34
|
});
|
|
32
35
|
// If after 10 seconds, forcefully shut down
|
|
33
36
|
setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trayio/express",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.91.0",
|
|
4
4
|
"description": "Express extensions and implementations",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": "./dist/*.js"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@trayio/commons": "4.
|
|
17
|
+
"@trayio/commons": "4.91.0",
|
|
18
18
|
"cors": "2.8.5",
|
|
19
19
|
"express": "4.20.0",
|
|
20
20
|
"formidable": "3.5.1"
|