fix prefix

This commit is contained in:
Иван 2025-12-08 22:16:51 +03:00
parent 606c479a23
commit bb5e577e56
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ 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');
const config = new DocumentBuilder() const config = new DocumentBuilder()
.setTitle('Travelmarine backend') .setTitle('Travelmarine backend')
.setDescription('Backend API for Travelmarine service') .setDescription('Backend API for Travelmarine service')
@ -12,7 +14,7 @@ async function bootstrap() {
.build(); .build();
const documentFactory = () => SwaggerModule.createDocument(app, config); const documentFactory = () => SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api', app, documentFactory); SwaggerModule.setup('/api', app, documentFactory);
await app.listen(process.env.PORT ?? 4000); await app.listen(process.env.PORT ?? 4000);
} }