From fc240c93d814cba707149f3a13cf197e61aaa373 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Wed, 21 Feb 2024 00:05:45 -0600 Subject: [PATCH] SO deployable config for the backend. (#83) * webapp-ify * SO deployable config for the backend. * Use process.env * Detangle --- packages/backend/src/constants.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/constants.ts b/packages/backend/src/constants.ts index 7803a7b1..ea3b4610 100644 --- a/packages/backend/src/constants.ts +++ b/packages/backend/src/constants.ts @@ -1,8 +1,10 @@ -export const DEFAULT_CONFIG_FILE_PATH = 'environments/local.toml'; +import process from 'process'; + +export const DEFAULT_CONFIG_FILE_PATH = process.env.SNOWBALL_BACKEND_CONFIG_FILE_PATH || 'environments/local.toml'; export const DEFAULT_GQL_PATH = '/graphql'; // Note: temporary hardcoded user, later to be derived from auth token -export const USER_ID = '59f4355d-9549-4aac-9b54-eeefceeabef0'; +export const USER_ID = process.env.SNOWBALL_BACKEND_USER_ID || '60f4355d-9549-4aac-9b54-eeefceeabef0'; -export const PROJECT_DOMAIN = 'snowball.xyz'; +export const PROJECT_DOMAIN = process.env.SNOWBALL_BACKEND_PROJECT_DOMAIN || 'snowball.xyz';