diff options
author | Alan Pearce | 2024-04-09 11:52:56 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-09 11:56:44 +0200 |
commit | 2d40fe2ceb36391cd2049f2f8689a9123bf024be (patch) | |
tree | 4df1297d8178e18aa46b442318d94009a8cc9a69 /src | |
parent | 3cc18d65200cfa3f30a621f110292561b823089d (diff) | |
download | website-2d40fe2ceb36391cd2049f2f8689a9123bf024be.tar.lz website-2d40fe2ceb36391cd2049f2f8689a9123bf024be.tar.zst website-2d40fe2ceb36391cd2049f2f8689a9123bf024be.zip |
Fix TypeScript warning about `env` access
Diffstat (limited to 'src')
-rw-r--r-- | src/app.ts | 4 | ||||
-rw-r--r-- | src/index.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/app.ts b/src/app.ts index a3c1c2f..317b9c0 100644 --- a/src/app.ts +++ b/src/app.ts @@ -8,10 +8,10 @@ import log from "loglevel"; import config from "./config"; -log.setLevel((import.meta.env.LOG_LEVEL || "info") as log.LogLevelDesc); +log.setLevel((import.meta.env["LOG_LEVEL"] || "info") as log.LogLevelDesc); Sentry.init({ - release: `homestead@${import.meta.env.FLY_MACHINE_VERSION}`, + release: `homestead@${import.meta.env["FLY_MACHINE_VERSION"]}`, tracesSampleRate: 1.0, }); diff --git a/src/index.ts b/src/index.ts index c12d153..17eacd8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import log from "loglevel"; import { server, metricsServer } from "./app"; -log.setLevel((import.meta.env.LOG_LEVEL || "info") as log.LogLevelDesc); +log.setLevel((import.meta.env["LOG_LEVEL"] || "info") as log.LogLevelDesc); const metricsServed = Bun.serve(metricsServer); console.info(`Metrics server started on port ${metricsServed.port}`); |