From d4fef3147d1a145f8419f891dd8b354dbb5d49e4 Mon Sep 17 00:00:00 2001 From: Roland Bernard <rolbernard@unibz.it> Date: Sat, 17 Apr 2021 13:05:39 +0200 Subject: [PATCH] The environment config is now loaded from NODE_ENV --- server/src/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/config.ts b/server/src/config.ts index 0c932c1..25c4d5e 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -1,4 +1,6 @@ +import { env } from 'process'; + export const port = 8000; export const keys = { @@ -10,5 +12,5 @@ export const headers = { 'Access-Control-Allow-Origin': '*', }; -export const environment = "development"; +export const environment = (env.NODE_ENV ?? 'development') as ('development' | 'staging' | 'production'); -- GitLab