port update for heroku

This commit is contained in:
gocivici 2023-09-26 12:52:17 +03:00
parent d9453d8db2
commit 5fedf8fe1d

View File

@ -11,7 +11,7 @@ const io = new Server(server, {
pingTimeout:5000
})
const port = 3000
// const port = 3000
app.use(express.static('public'))
@ -85,6 +85,6 @@ setInterval(() =>{
io.emit('updatePlayers',bPlayers)
},15)
server.listen(port,() =>{
console.log(`app listening on port ${port}`)
server.listen((process.env.PORT || 3000),() =>{
console.log(`app listening on port ${(process.env.PORT || 3000)}`)
})