aboutsummaryrefslogtreecommitdiff
path: root/src/util/config.ts
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2021-09-25 17:33:23 +0000
committerKevin J Hoerr <kjhoerr@protonmail.com>2021-09-25 17:33:23 +0000
commit283c3f14760c925fe9bf51a2db6f2d567dedb4fe (patch)
treee3617b15b1493788bbf37f957be81aacac4ffdf6 /src/util/config.ts
parentdd829249122948fd66dd885dbd39a0cd9167118d (diff)
downloadao-coverage-283c3f14760c925fe9bf51a2db6f2d567dedb4fe.tar.gz
ao-coverage-283c3f14760c925fe9bf51a2db6f2d567dedb4fe.tar.bz2
ao-coverage-283c3f14760c925fe9bf51a2db6f2d567dedb4fe.zip
Add lint check to pipeline
Diffstat (limited to 'src/util/config.ts')
-rw-r--r--src/util/config.ts42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/util/config.ts b/src/util/config.ts
index e83eab7..b98444c 100644
--- a/src/util/config.ts
+++ b/src/util/config.ts
@@ -81,7 +81,7 @@ export const handleStartup = async (
await persistTemplate({
inputFile: path.join(publicDir, "templates", "sh.template"),
outputFile: path.join(hostDir, "sh"),
- context: { TARGET_URL: targetUrl }
+ context: { TARGET_URL: targetUrl },
} as Template);
await persistTemplate({
inputFile: path.join(publicDir, "templates", "index.html.template"),
@@ -90,8 +90,8 @@ export const handleStartup = async (
TARGET_URL: targetUrl,
CURL_HTTPS: targetUrl.includes("https")
? "--proto '=https' --tlsv1.2 "
- : ""
- }
+ : "",
+ },
} as Template);
return mongo;
@@ -101,22 +101,22 @@ export const handleStartup = async (
}
};
-export const handleShutdown = (mongo: MongoClient, server: Server) => (
- signal: NodeJS.Signals
-): Promise<void> => {
- logger.warn("%s signal received. Closing shop.", signal);
+export const handleShutdown =
+ (mongo: MongoClient, server: Server) =>
+ (signal: NodeJS.Signals): Promise<void> => {
+ logger.warn("%s signal received. Closing shop.", signal);
- return mongo
- .close()
- .then(() => {
- logger.info("MongoDB client connection closed.");
- return new Promise((res, rej) =>
- server.close(err => {
- logger.info("Express down.");
- (err ? rej : res)(err);
- })
- );
- })
- .then(() => process.exit(0))
- .catch(() => process.exit(1));
-};
+ return mongo
+ .close()
+ .then(() => {
+ logger.info("MongoDB client connection closed.");
+ return new Promise((res, rej) =>
+ server.close((err) => {
+ logger.info("Express down.");
+ (err ? rej : res)(err);
+ })
+ );
+ })
+ .then(() => process.exit(0))
+ .catch(() => process.exit(1));
+ };