fix: prefix API routes
This commit is contained in:
5
apps/api/src/app.config.ts
Normal file
5
apps/api/src/app.config.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
|
||||
export function configureApplication(app: INestApplication): void {
|
||||
app.setGlobalPrefix('api');
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
import { configureApplication } from './app.config';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
configureApplication(app);
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
bootstrap();
|
||||
|
||||
Reference in New Issue
Block a user