Skip to content

Commit

Permalink
fix userConnected
Browse files Browse the repository at this point in the history
  • Loading branch information
Vorshim92 committed Jan 11, 2025
1 parent afac19d commit 8a97ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function incrementViewsCounter(io) {
function setUsersConnected(io, connection) {
usersConnected = usersConnected + connection;

io.emit("usersConnectedUpdate", { usersConnected: data.usersConnected });
io.emit("usersConnectedUpdate", { usersConnected });
}

const server = http.createServer(app);
Expand Down Expand Up @@ -133,5 +133,5 @@ io.on("connection", (socket) => {
setInterval(() => incrementStepCounter(io), 750);

server.listen(port, "0.0.0.0", () => {
console.log(`Server in ascolto su http://localhost:${port}`);
console.log(`Server in ascolto su https://localhost:${port}`);
});

0 comments on commit 8a97ad2

Please sign in to comment.