2026-05-07 19:11:14 +03:30
|
|
|
import 'reflect-metadata';
|
2026-05-02 18:54:01 +03:30
|
|
|
import { NestFactory } from '@nestjs/core';
|
2026-05-12 14:42:36 +03:30
|
|
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
2026-05-02 18:54:01 +03:30
|
|
|
import { AppModule } from './app.module';
|
|
|
|
|
|
|
|
|
|
async function bootstrap() {
|
|
|
|
|
const app = await NestFactory.create(AppModule);
|
2026-05-12 14:42:36 +03:30
|
|
|
const swaggerConfig = new DocumentBuilder()
|
|
|
|
|
.setTitle('Montime API')
|
|
|
|
|
.setDescription('Local services super app API')
|
|
|
|
|
.setVersion('1.0')
|
|
|
|
|
.addBearerAuth()
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
const swaggerDocument = SwaggerModule.createDocument(app, swaggerConfig);
|
|
|
|
|
SwaggerModule.setup('docs', app, swaggerDocument, {
|
|
|
|
|
swaggerOptions: {
|
|
|
|
|
persistAuthorization: true,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-02 18:54:01 +03:30
|
|
|
await app.listen(process.env.PORT ?? 3000);
|
|
|
|
|
}
|
|
|
|
|
bootstrap();
|