Skip to content

Commit

Permalink
add option for using a keep-alive timeout (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrockmeyer-a authored May 15, 2022
1 parent 6c0fbf2 commit 1d7764f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/src/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export async function createServer() {
reply.status(200).send('OK');
});

app.server.keepAliveTimeout = config.keepAliveTimeout || app.server.keepAliveTimeout;

sLogger.info('Stitch gateway is ready to start');
return app;
}
Expand Down
1 change: 1 addition & 0 deletions services/src/modules/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const envVarExt = envVar.from(process.env, {
export const nodeEnv = envVarExt.get('NODE_ENV').default('development').asString();

export const httpPort = envVarExt.get('PORT').default('8080').asIntPositive();
export const keepAliveTimeout = envVarExt.get('KEEP_ALIVE_TIMEOUT').asIntPositive();

// Logging
export type ChildLoggersLevels = Record<string, LevelWithSilent>;
Expand Down

0 comments on commit 1d7764f

Please sign in to comment.