From 5fedf8fe1d3105c180e5d4dc3beb7814528880e4 Mon Sep 17 00:00:00 2001 From: gocivici Date: Tue, 26 Sep 2023 12:52:17 +0300 Subject: [PATCH] port update for heroku --- backend.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend.js b/backend.js index 1e9e6dd..fac7c3d 100644 --- a/backend.js +++ b/backend.js @@ -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)}`) }) \ No newline at end of file