added the api prefix
test-org/trust-module-backend/pipeline/pr-rc This commit looks good Details

pull/12/head
DmitriyA 2025-04-09 10:02:55 -04:00
parent 23d2fd7eff
commit 243a45756a
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,9 @@ import { AppModule } from './app.module';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule);
// Установка глобального префикса для всех маршрутов
app.setGlobalPrefix('api');
//настройка CORS //настройка CORS
app.enableCors({ app.enableCors({

View File

@ -9,7 +9,7 @@ import { Logger } from '@nestjs/common';
methods: ['GET', 'POST'], methods: ['GET', 'POST'],
credentials: true credentials: true
}, },
namespace: '/metrics-ws' namespace: '/api/metrics-ws'
}) })
export class MetricsGateway implements OnGatewayInit, OnGatewayConnection, OnGatewayDisconnect { export class MetricsGateway implements OnGatewayInit, OnGatewayConnection, OnGatewayDisconnect {
@WebSocketServer() server: Server; @WebSocketServer() server: Server;