From 57acc4f327e177cb8f1b9f8fe8a8764ab1ae8cd5 Mon Sep 17 00:00:00 2001 From: jundm Date: Tue, 5 Apr 2022 17:35:33 +0900 Subject: [PATCH] fix:udpate port --- frontend/.env.development | 2 +- frontend/.env.production | 2 +- frontend/next.config.js | 4 ++-- frontend/pages/accounts/login/index.tsx | 12 ++++++------ frontend/utils/Cookies/config/config.json | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/.env.development b/frontend/.env.development index 36c9450..1985386 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -2,5 +2,5 @@ DEVELOPMENT_ENV_VARIABLE="server_only_development_variable" NEXT_PUBLIC_DEVELOPMENT_ENV_VARIABLE="public_development_variable" HOSTNAME=localhost -PORT=8000 +PORT=9000 NEXT_PUBLIC_ENV_BASE_URL=http://$HOSTNAME:$PORT/ diff --git a/frontend/.env.production b/frontend/.env.production index 6188b13..f46dcea 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -2,5 +2,5 @@ PRODUCTION_ENV_VARIABLE="server_only_production_variable" NEXT_PUBLIC_PRODUCTION_ENV_VARIABLE="public_production_variable" HOSTNAME=MY_BACKEND_SERVER -PORT=8000 +PORT=80 NEXT_PUBLIC_ENV_BASE_URL=http://$HOSTNAME:$PORT/ diff --git a/frontend/next.config.js b/frontend/next.config.js index 6e67805..6e6175f 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -22,8 +22,8 @@ module.exports = (phase, { defaultConfig }) => { const env = { RESTURL_BACKEND: (() => { - if (isDev) return "http://localhost:8000/"; - if (isProd) return "https://backend.blabla:8000/"; + if (isDev) return "http://localhost:9000/"; + if (isProd) return "http://localhost:9000/"; if (isStaging) return "http://localhost:11639/"; return "RESTURL_BACKEND:not (isDev,isProd && !isStaging,isProd && isStaging)"; })(), diff --git a/frontend/pages/accounts/login/index.tsx b/frontend/pages/accounts/login/index.tsx index 74f27fc..19b61d0 100644 --- a/frontend/pages/accounts/login/index.tsx +++ b/frontend/pages/accounts/login/index.tsx @@ -35,12 +35,6 @@ function Login() { const loginWidth = 300; const [form] = Form.useForm(); const [isLoading, setIsLoading] = useState(false); - const [inputs, setInputs] = useState({ - email: rememberEmailInput, - password: "", - }); - - const { email, password } = inputs; //*@param: email async-validator message remove {https://github.com/yiminghe/async-validator/issues/92} const warn = console.warn; console.warn = (...args: any[]) => { @@ -48,6 +42,12 @@ function Login() { return; warn(...args); }; + const [inputs, setInputs] = useState({ + email: rememberEmailInput, + password: "", + }); + + const { email, password } = inputs; const onChange = (e: any) => { const { name, value } = e.target; setInputs({ diff --git a/frontend/utils/Cookies/config/config.json b/frontend/utils/Cookies/config/config.json index 0dddb1f..f309849 100644 --- a/frontend/utils/Cookies/config/config.json +++ b/frontend/utils/Cookies/config/config.json @@ -1,10 +1,10 @@ { "development": { - "BACKEND_URL": "http://localhost:8000/", + "BACKEND_URL": "http://localhost:9000/", "HTTP_ONLY": false }, "production": { - "BACKEND_URL": "...", + "BACKEND_URL": "http://localhost:9000/", "HTTP_ONLY": true } }