Skip to content

Commit

Permalink
perf: add cors to endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
elvis-ndubuisi committed Mar 2, 2024
1 parent f2771d6 commit 79e5304
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Empty file removed .commitlintrc
Empty file.
2 changes: 1 addition & 1 deletion apps/server/src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Controller, Get } from "@nestjs/common";
import { AppService } from "./app.service";

@Controller()
@Controller({ version: "1" })
export class AppController {
constructor(private readonly appService: AppService) {}

Expand Down
3 changes: 3 additions & 0 deletions apps/server/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";
import { VersioningType } from "@nestjs/common";

async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors();
app.enableVersioning({ type: VersioningType.URI });
await app.listen(3000);
}
bootstrap();

0 comments on commit 79e5304

Please sign in to comment.