From a61966d4bdb1a7f55af0c8f8333555a530548ec5 Mon Sep 17 00:00:00 2001 From: Wayne Date: Fri, 8 Mar 2024 14:47:48 +0900 Subject: [PATCH] Update environment config --- .env.development | 5 +---- .env.production | 7 ++----- src/config/api.ts | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.env.development b/.env.development index 696c222..6d999ff 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,2 @@ -API_HOST=localhost -API_PORT=8090 -API_PROTOCOL=http -API_BASE_PATH=/api +API_URL=http://localhost:8090/api NEXTAUTH_SECRET=secret \ No newline at end of file diff --git a/.env.production b/.env.production index af464d0..395d0b9 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,3 @@ -API_HOST=tsms-uat.2fi-solutions.com -API_PORT=80 -API_PROTOCOL=https -API_BASE_PATH=/back-api +API_URL=https://tsms-uat.2fi-solutions.com/back-api NEXTAUTH_SECRET=secret -NEXTAUTH_URL=tsms-uat.2fi-solutions.com \ No newline at end of file +NEXTAUTH_URL=https://tsms-uat.2fi-solutions.com \ No newline at end of file diff --git a/src/config/api.ts b/src/config/api.ts index 7ea9a47..376fd05 100644 --- a/src/config/api.ts +++ b/src/config/api.ts @@ -1,2 +1,2 @@ -export const BASE_API_URL = `${process.env.API_PROTOCOL}://${process.env.API_HOST}:${process.env.API_PORT}${process.env.API_BASE_PATH}`; +export const BASE_API_URL = `${process.env.API_URL}`; export const LOGIN_API_PATH = `${BASE_API_URL}/login`;