This commit is contained in:
2026-02-06 02:52:33 +03:00
parent 7de2c33bfe
commit bbb453826b
3 changed files with 6 additions and 6 deletions

View File

@ -12,14 +12,14 @@ async function bootstrap() {
// Security // Security
app.use(helmet()); app.use(helmet());
// CORS (веб часто на 3000) // CORS (веб на 3080)
const allowedOrigins = [ const allowedOrigins = [
configService.get('NEXT_PUBLIC_APP_URL'), configService.get('NEXT_PUBLIC_APP_URL'),
'http://localhost:3080',
'http://localhost:3000', 'http://localhost:3000',
'http://localhost:3125',
].filter(Boolean) as string[]; ].filter(Boolean) as string[];
app.enableCors({ app.enableCors({
origin: allowedOrigins.length ? allowedOrigins : 'http://localhost:3000', origin: allowedOrigins.length ? allowedOrigins : 'http://localhost:3080',
credentials: true, credentials: true,
}); });

View File

@ -3,9 +3,9 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev -p 3000", "dev": "next dev -p 3080",
"build": "next build", "build": "next build",
"start": "next start -p 3000", "start": "next start -p 3080",
"lint": "next lint", "lint": "next lint",
"clean": "rm -rf .next .turbo node_modules" "clean": "rm -rf .next .turbo node_modules"
}, },

2
run.sh
View File

@ -35,5 +35,5 @@ echo "Логи: logs/start.log"
echo "" echo ""
echo "=== Готово ===" echo "=== Готово ==="
echo "Docker: postgres, redis, meilisearch" echo "Docker: postgres, redis, meilisearch"
echo "Приложения: API (3125), Web (3000), AI Service — в фоне" echo "Приложения: API (3125), Web (3080), AI Service — в фоне"
echo "Остановить приложения: kill \$(cat .start.pid)" echo "Остановить приложения: kill \$(cat .start.pid)"