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