From e8ee611575b0d259dfd61c6cc5c763deb766f5a1 Mon Sep 17 00:00:00 2001 From: lbwa Date: Sun, 8 Mar 2020 22:29:01 +0800 Subject: [PATCH] feat: add .env files --- .env | 1 + .env.development | 1 + src/constants.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .env create mode 100644 .env.development diff --git a/.env b/.env new file mode 100644 index 0000000..5946eeb --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VUE_APP_REQUEST_BASE_URL=http://localhost:3000 \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..5946eeb --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +VUE_APP_REQUEST_BASE_URL=http://localhost:3000 \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts index e879afd..206ce58 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -27,6 +27,6 @@ export const QUERY_KEY_FOR_LOGIN_TO = '__from' */ export const DEFAULT_NAV_ICON = 'work_outline' -export const REQUEST_BASE_URL = 'http://localhost:3000' +export const REQUEST_BASE_URL = process.env.VUE_APP_REQUEST_BASE_URL export const REQUEST_TIMEOUT_THRESHOLD = 1000 * 15