Skip to content

Commit

Permalink
chore(app.ts): rm duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Eejit43 committed Sep 22, 2024
1 parent 47c4097 commit 6820a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fastify.setNotFoundHandler((request, reply) =>
// Start server
const port = process.env.PORT ? Number.parseInt(process.env.PORT) : 3000;

fastify.listen({ port: process.env.PORT ? Number.parseInt(process.env.PORT) : 3000, host: '0.0.0.0' }, (error) => {
fastify.listen({ port, host: '0.0.0.0' }, (error) => {
if (error) {
if ((error as FastifyError).code === 'EADDRINUSE') consola.error(`${chalk.red('[Startup error]:')} Port ${chalk.yellow(port)} is already in use!`);
else consola.error(error);
Expand Down

0 comments on commit 6820a0e

Please sign in to comment.