Skip to content

Commit

Permalink
fix:udpate port
Browse files Browse the repository at this point in the history
  • Loading branch information
jundm committed Apr 5, 2022
1 parent 249ef0d commit 57acc4f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion frontend/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -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/
4 changes: 2 additions & 2 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
})(),
Expand Down
12 changes: 6 additions & 6 deletions frontend/pages/accounts/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ 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[]) => {
if (typeof args[0] === "string" && args[0].startsWith("async-validator:"))
return;
warn(...args);
};
const [inputs, setInputs] = useState({
email: rememberEmailInput,
password: "",
});

const { email, password } = inputs;
const onChange = (e: any) => {
const { name, value } = e.target;
setInputs({
Expand Down
4 changes: 2 additions & 2 deletions frontend/utils/Cookies/config/config.json
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 57acc4f

Please sign in to comment.