Skip to content

Commit 49ebb7f

Browse files
authored
Merge pull request #30 from monstar-lab-oss/yash/api-prefix
Add API versioning prefix
2 parents 623683b + 860b8de commit 49ebb7f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import { RequestIdMiddleware } from './shared/middleware/request-id/request-id.m
1010

1111
async function bootstrap() {
1212
const app = await NestFactory.create(AppModule);
13+
app.setGlobalPrefix('api/v1');
14+
1315
app.useLogger(new AppLogger(app.get(Logger)));
1416
app.useGlobalPipes(new ValidationPipe());
1517
app.use(RequestIdMiddleware);
1618
app.enableCors();
1719

18-
1920
/** Swagger configuration*/
2021
const options = new DocumentBuilder()
2122
.setTitle('Nestjs API starter')

0 commit comments

Comments
 (0)