Skip to content

Commit

Permalink
fix port assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
adidoesnt committed Feb 4, 2024
1 parent b0470b3 commit c1e462c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telegram-bot/src/components/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ const { PORT: port, TELEGRAM_BOT_TOKEN: token = '' } = process.env;
export class Server {
static instance: Server;
private app: Express;
private readonly port: number;
private readonly port: string | number;
private logger: Log4js;

private constructor() {
this.logger = Logger.getLogger('Server');
this.logger.info('Initialising server');
this.app = express();
this.port = Number(port);
this.port = port ?? 3000;
this.app.use(json());
this.app.listen(this.port, () => {
this.logger.info(`Server running on port ${this.port}`);
Expand Down

0 comments on commit c1e462c

Please sign in to comment.