From 4554e8cd1f2ffe1b85436e9daf607b7a290e4e31 Mon Sep 17 00:00:00 2001 From: jundm Date: Fri, 15 Apr 2022 04:25:39 +0900 Subject: [PATCH] feat:bofore deploy backup --- frontend/.env.development | 3 ++- frontend/.env.production | 4 ++-- frontend/next.config.js | 2 +- frontend/utils/Cookies/config/config.json | 2 +- frontend/utils/Hook/useFetch.ts | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/.env.development b/frontend/.env.development index 1985386..22d6d4d 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,6 +1,7 @@ DEVELOPMENT_ENV_VARIABLE="server_only_development_variable" NEXT_PUBLIC_DEVELOPMENT_ENV_VARIABLE="public_development_variable" -HOSTNAME=localhost +# HOSTNAME=localhost PORT=9000 +HOSTNAME=localhost NEXT_PUBLIC_ENV_BASE_URL=http://$HOSTNAME:$PORT/ diff --git a/frontend/.env.production b/frontend/.env.production index f46dcea..0f4bbf2 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -1,6 +1,6 @@ PRODUCTION_ENV_VARIABLE="server_only_production_variable" NEXT_PUBLIC_PRODUCTION_ENV_VARIABLE="public_production_variable" -HOSTNAME=MY_BACKEND_SERVER -PORT=80 +HOSTNAME=13.209.33.37 +PORT=9000 NEXT_PUBLIC_ENV_BASE_URL=http://$HOSTNAME:$PORT/ diff --git a/frontend/next.config.js b/frontend/next.config.js index 6e6175f..ac62cc2 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -23,7 +23,7 @@ module.exports = (phase, { defaultConfig }) => { const env = { RESTURL_BACKEND: (() => { if (isDev) return "http://localhost:9000/"; - if (isProd) return "http://localhost:9000/"; + if (isProd) return "http://13.209.33.37:9000/"; if (isStaging) return "http://localhost:11639/"; return "RESTURL_BACKEND:not (isDev,isProd && !isStaging,isProd && isStaging)"; })(), diff --git a/frontend/utils/Cookies/config/config.json b/frontend/utils/Cookies/config/config.json index f309849..d191274 100644 --- a/frontend/utils/Cookies/config/config.json +++ b/frontend/utils/Cookies/config/config.json @@ -4,7 +4,7 @@ "HTTP_ONLY": false }, "production": { - "BACKEND_URL": "http://localhost:9000/", + "BACKEND_URL": "http://13.209.33.37:9000/", "HTTP_ONLY": true } } diff --git a/frontend/utils/Hook/useFetch.ts b/frontend/utils/Hook/useFetch.ts index a7b62ca..f6722fd 100644 --- a/frontend/utils/Hook/useFetch.ts +++ b/frontend/utils/Hook/useFetch.ts @@ -1,3 +1,4 @@ +import { useState } from "react"; import { setVerifyToken } from "@utils/Cookies/TokenManager"; import axios from "axios"; import useSWR from "swr";