change url
This commit is contained in:
@@ -8,6 +8,7 @@ Open [http://localhost:2999](http://localhost:2999)
|
|||||||
|
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
docker-compose down -v --rmi all
|
||||||
docker-compose up
|
docker-compose up
|
||||||
Open [http://localhost:2998](http://localhost:2998)
|
Open [http://localhost:2998](http://localhost:2998)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,6 +11,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- PORT=2999
|
- PORT=2999
|
||||||
|
- DOCKER_ENV=true
|
||||||
volumes:
|
volumes:
|
||||||
- ./public:/app/public
|
- ./public:/app/public
|
||||||
- ./package.json:/app/package.json
|
- ./package.json:/app/package.json
|
||||||
@@ -20,5 +21,4 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
external: true
|
|
||||||
name: app-network
|
name: app-network
|
||||||
@@ -6,7 +6,7 @@ import { redirect } from 'next/navigation';
|
|||||||
|
|
||||||
const API_BASE_URL = process.env.NODE_ENV === 'development'
|
const API_BASE_URL = process.env.NODE_ENV === 'development'
|
||||||
? 'http://localhost'
|
? 'http://localhost'
|
||||||
: '';
|
: 'http://ncp-3_app:8080';
|
||||||
|
|
||||||
export async function logout() {
|
export async function logout() {
|
||||||
const token = await getSessionData('token');
|
const token = await getSessionData('token');
|
||||||
@@ -114,18 +114,17 @@ export async function registration(
|
|||||||
await createSession(parsed.token, email);
|
await createSession(parsed.token, email);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`
|
throw new Error(`
|
||||||
Something went wrong. from server1 \n
|
Something went wrong. from server
|
||||||
${API_BASE_URL}/api/auth/register \n
|
|
||||||
curr url \n
|
|
||||||
|
|
||||||
|
${API_BASE_URL}/api/auth/register
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
const errors: Record<string, string> = {}
|
const errors: Record<string, string> = {}
|
||||||
errors['server'] = `
|
errors['server'] = `
|
||||||
Something went wrong. from server22 \n
|
${API_BASE_URL}/api/auth/register
|
||||||
${API_BASE_URL}/api/auth/register \n
|
|
||||||
error-- ${error}
|
error-- ${error}
|
||||||
`
|
`
|
||||||
return errors;
|
return errors;
|
||||||
|
|||||||
Reference in New Issue
Block a user