Skip to content

Commit fdbbacd

Browse files
committed
update
1 parent c1fa937 commit fdbbacd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ io.on('connection', function(socket){
1717

1818
//when a user online, +1 value to count
1919
count++;
20+
//send value of "count" to index.html, known as "count" variable
21+
//index.html will start to retrieve data at event "calc"
2022
io.emit('calc', {count : count});
2123

2224
console.log("client : " + count);

0 commit comments

Comments
 (0)