diff --git a/src/server/main.ts b/src/server/main.ts index 556039f..589d40b 100644 --- a/src/server/main.ts +++ b/src/server/main.ts @@ -107,5 +107,7 @@ io.on('connection', (socket) => { }); }); -console.log('listening on port :3000'); -io.listen(3000); +const port = parseInt(process.env.PORT || '3000'); + +console.log(`listening on port :${port}`); +io.listen(port);