mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +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 { ConfigService } from '@nestjs/config';
|
||||||
import { NestFactory } from '@nestjs/core';
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||||
@ -17,6 +17,12 @@ async function bootstrap() {
|
|||||||
preflightContinue: false,
|
preflightContinue: false,
|
||||||
optionsSuccessStatus: 204,
|
optionsSuccessStatus: 204,
|
||||||
});
|
});
|
||||||
|
app.setGlobalPrefix('api', {
|
||||||
|
exclude: [
|
||||||
|
{ path: 'health', method: RequestMethod.GET },
|
||||||
|
{ path: 'health/details', method: RequestMethod.GET },
|
||||||
|
],
|
||||||
|
});
|
||||||
const config = app.get(ConfigService);
|
const config = app.get(ConfigService);
|
||||||
const swaggerDocument = await createSwagger(app);
|
const swaggerDocument = await createSwagger(app);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user