From 3ffbd156cdde113f701ab0b76058ba6f68144594 Mon Sep 17 00:00:00 2001 From: alexbcberio Date: Sat, 19 Jun 2021 23:00:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20Add=20type=20for=20Envi?= =?UTF-8?q?ronment=20mode=20and=20remove=20raw=20environment=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/helpers/util.ts | 7 ++++--- src/enums/Environment.ts | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/enums/Environment.ts diff --git a/src/backend/helpers/util.ts b/src/backend/helpers/util.ts index b7c721b..16d0422 100644 --- a/src/backend/helpers/util.ts +++ b/src/backend/helpers/util.ts @@ -1,9 +1,10 @@ +import { Environment } from "../../enums/Environment"; + const environment = process.env.NODE_ENV; -const isDevelopment = environment === "development"; -const isProduction = environment === "production"; +const isDevelopment = environment === Environment.development; +const isProduction = environment === Environment.production; export { - environment, isDevelopment, isProduction }; \ No newline at end of file diff --git a/src/enums/Environment.ts b/src/enums/Environment.ts new file mode 100644 index 0000000..3df7117 --- /dev/null +++ b/src/enums/Environment.ts @@ -0,0 +1,4 @@ +export enum Environment { + development = "development", + production = "production" +} \ No newline at end of file