chore: fmt

This commit is contained in:
Michael Abebe
2026-05-12 16:50:18 +03:00
parent 4540d35215
commit 1c5ee19388
181 changed files with 1492 additions and 1100 deletions

View File

@@ -1,28 +1,32 @@
import 'reflect-metadata';
import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { HttpExceptionFilter, ResponseTransformInterceptor, createValidationPipe } from '@edr/api-common';
import "reflect-metadata";
import { NestFactory } from "@nestjs/core";
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
import {
HttpExceptionFilter,
ResponseTransformInterceptor,
createValidationPipe,
} from "@edr/api-common";
import { AppModule } from './app.module';
import { AppModule } from "./app.module";
async function bootstrap() {
const app = await NestFactory.create(AppModule, { cors: true });
app.setGlobalPrefix('api');
app.setGlobalPrefix("api");
app.useGlobalPipes(createValidationPipe());
app.useGlobalFilters(new HttpExceptionFilter());
app.useGlobalInterceptors(new ResponseTransformInterceptor());
const config = new DocumentBuilder()
.setTitle('EDR Freight API')
.setDescription('API for the EDR Freight Management application')
.setVersion('0.1.0')
.setTitle("EDR Freight API")
.setDescription("API for the EDR Freight Management application")
.setVersion("0.1.0")
.addBearerAuth()
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api/docs', app, document);
SwaggerModule.setup("api/docs", app, document);
const port = parseInt(process.env.PORT ?? '3001', 10);
const port = parseInt(process.env.PORT ?? "3001", 10);
await app.listen(port);
// eslint-disable-next-line no-console
console.log(`[freight-api] listening on http://localhost:${port}`);