Skip to content

Commit

Permalink
Log prod mode in api
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Jan 5, 2024
1 parent efc9bed commit a89b32b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as fs from 'fs';
async function bootstrap() {
const app = await NestFactory.create(AppModule);


app.use(cookieParser(config.appSecret));
app.enableCors({
origin: (origin, callback) => callback(null, true),
Expand All @@ -28,6 +29,6 @@ async function bootstrap() {
app.use(passport.initialize());

await app.listen(config.port);
console.log(`Server is running on: ${await app.getUrl()}`);
console.log(`Server is running on: ${await app.getUrl()}\nProduction mode ${config.isProduction ? 'enabled' : 'disabled'}`);
}
bootstrap();

0 comments on commit a89b32b

Please sign in to comment.