Files
3dp-manager/server/src/main.ts
T
Den Piligrim ff7b1646b8 nest proto
2026-02-01 12:50:45 +03:00

25 lines
711 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app.module';
import { AuthService } from './auth/auth.service';
import { RequestMethod } from '@nestjs/common';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.set('trust proxy', 1);
const authService = app.get(AuthService);
await authService.seedAdmin();
app.enableCors();
app.setGlobalPrefix('api', {
exclude: [
{ path: 'bus/:uuid', method: RequestMethod.GET },
{ path: 'bus/:uuid/:tunnelId', method: RequestMethod.GET },
]
});
await app.listen(3000);
}
bootstrap();