From 187cf7bd2a0f2f031d9c215435d25e1354f7b5ba Mon Sep 17 00:00:00 2001 From: Timothy-Gonzalez <105177619+Timothy-Gonzalez@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:05:19 -0500 Subject: [PATCH] Add comment to config.ts --- src/config.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 6a2defc5..19f3a1cb 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,3 +1,10 @@ +/* + * This file defines all config used anywhere in the api. These values need to be defined on import. + * + * By moving all env variable usage to one place, we also make managing their usage much easier, and + * can error if they are not defined. + */ + import env from "./env.js"; export enum Device { @@ -45,7 +52,6 @@ const Config = { METADATA_URL: "https://hackillinois.github.io/adonix-metadata/config.json", /* OAuth, Keys, & Permissions */ - DB_URL: `mongodb+srv://${requireEnv("DB_USERNAME")}:${requireEnv("DB_PASSWORD")}@${requireEnv("DB_SERVER")}/`, GITHUB_OAUTH_ID: requireEnv("GITHUB_OAUTH_ID"),