added prefix config
This commit is contained in:
parent
a7ec0e3cde
commit
3f258bcd33
4 changed files with 12 additions and 13 deletions
|
|
@ -2,7 +2,7 @@ import { Controller, Get } from '@nestjs/common';
|
|||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
@Get('health')
|
||||
@Get('healthcheck')
|
||||
health() {
|
||||
return { status: 'healthy' };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { NestExpressApplication } from '@nestjs/platform-express';
|
|||
|
||||
async function bootstrap(): Promise<void> {
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||
app.setGlobalPrefix('common-cents');
|
||||
app.setGlobalPrefix(process.env.PREFIX ?? 'common-cents');
|
||||
await app.listen(process.env.PORT ?? 3000);
|
||||
}
|
||||
void bootstrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue