Skip to content

Commit

Permalink
Merge pull request #30 from monstar-lab-oss/yash/api-prefix
Browse files Browse the repository at this point in the history
Add API versioning prefix
  • Loading branch information
yashmurty authored Sep 2, 2020
2 parents 623683b + 860b8de commit 49ebb7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 49ebb7f

Please sign in to comment.