From 860b8de007f90721543030ac08e1c289ebab587f Mon Sep 17 00:00:00 2001 From: Yash Murty Date: Wed, 2 Sep 2020 12:13:39 +0900 Subject: [PATCH] :construction: Add api versioning prefix --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index ed6b253..48d296d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,12 +10,13 @@ import { RequestIdMiddleware } from './shared/middleware/request-id/request-id.m async function bootstrap() { const app = await NestFactory.create(AppModule); + app.setGlobalPrefix('api/v1'); + app.useLogger(new AppLogger(app.get(Logger))); app.useGlobalPipes(new ValidationPipe()); app.use(RequestIdMiddleware); app.enableCors(); - /** Swagger configuration*/ const options = new DocumentBuilder() .setTitle('Nestjs API starter')