change url

This commit is contained in:
smanylov
2025-12-03 15:38:54 +07:00
parent 46cf768bd8
commit c0acec016b
3 changed files with 7 additions and 7 deletions
+1
View File
@@ -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
View File
@@ -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
+5 -6
View File
@@ -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;