diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-12 15:39:06 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-12-12 15:39:06 -0500 |
| commit | 15930182a7ca048a2472e0120650646542b31614 (patch) | |
| tree | a7450b94fb899fde5b0eaaa4cdc7a395a03493ad /src/routes.ts | |
| parent | bc549648b38698b7bd3cb71ab7e71bb17a3a68a1 (diff) | |
| download | ao-coverage-15930182a7ca048a2472e0120650646542b31614.tar.gz ao-coverage-15930182a7ca048a2472e0120650646542b31614.tar.bz2 ao-coverage-15930182a7ca048a2472e0120650646542b31614.zip | |
Use nullish-coalescing op for env var assignments
Diffstat (limited to 'src/routes.ts')
| -rw-r--r-- | src/routes.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes.ts b/src/routes.ts index d429659..79b6fea 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -11,8 +11,8 @@ import { configOrError } from "./util/config"; import loggerConfig from "./util/logger"; import { Messages } from "./errors"; -const TOKEN = process.env.TOKEN || ""; -const UPLOAD_LIMIT = Number(process.env.UPLOAD_LIMIT || 4194304); +const TOKEN = process.env.TOKEN ?? ""; +const UPLOAD_LIMIT = Number(process.env.UPLOAD_LIMIT ?? 4194304); const HOST_DIR = configOrError("HOST_DIR"); const logger = winston.createLogger(loggerConfig("HTTP")); |
