mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 00:24:54 +00:00
feat: prefix all apis
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { INestApplication, RequestMethod } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
@ -17,6 +17,12 @@ async function bootstrap() {
|
||||
preflightContinue: false,
|
||||
optionsSuccessStatus: 204,
|
||||
});
|
||||
app.setGlobalPrefix('api', {
|
||||
exclude: [
|
||||
{ path: 'health', method: RequestMethod.GET },
|
||||
{ path: 'health/details', method: RequestMethod.GET },
|
||||
],
|
||||
});
|
||||
const config = app.get(ConfigService);
|
||||
const swaggerDocument = await createSwagger(app);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user