fix port definition
This commit is contained in:
parent
3d0d054f64
commit
bf468ba8ae
11
src/main.ts
11
src/main.ts
@ -25,11 +25,12 @@ async function bootstrap() {
|
|||||||
app.getHttpAdapter().get('/api/swagger-json', (req, res) => {
|
app.getHttpAdapter().get('/api/swagger-json', (req, res) => {
|
||||||
res.json(document);
|
res.json(document);
|
||||||
});
|
});
|
||||||
|
const port = process.env.PORT || 3000;
|
||||||
await app.listen(process.env.PORT ?? 3000);
|
await app.listen(port);
|
||||||
console.log(`Application is running on: http://localhost:3000`);
|
|
||||||
console.log(`Swagger docs: http://localhost:3000/api/docs`);
|
console.log(`Application is running on: http://localhost:${port}`);
|
||||||
console.log(`Swagger content: http://localhost:3000/api/swagger-json`);
|
console.log(`Swagger docs: http://localhost:${port}/api/docs`);
|
||||||
|
console.log(`Swagger docs: http://localhost:${port}/api/swagger-json`);
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user