File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import { Server , Socket } from "socket.io" ;
1+ import { Server } from "socket.io" ;
22
33const io = new Server ( 8080 , {
44 cors : {
@@ -15,7 +15,7 @@ interface Todo {
1515
1616let todos : Array < Todo > = [ ] ;
1717
18- io . on ( "connect" , ( socket : Socket ) => {
18+ io . on ( "connect" , ( socket ) => {
1919 socket . emit ( "todos" , todos ) ;
2020
2121 // note: we could also create a CRUD (create/read/update/delete) service for the todo list
Original file line number Diff line number Diff line change 1- import { Server , Socket } from "socket.io" ;
1+ import { Server } from "socket.io" ;
22
33const io = new Server ( 8080 ) ;
44
5- io . on ( "connect" , ( socket : Socket ) => {
5+ io . on ( "connect" , ( socket ) => {
66 console . log ( `connect ${ socket . id } ` ) ;
77
88 socket . on ( "ping" , ( cb ) => {
You can’t perform that action at this time.
0 commit comments