Hi i am trying to create a basic realtime application in socket.io , i have completely setup the server side in node.js and the file "socket.io.js" is also being imported in browser but somehow when i try to connect with socket.io server using let io = io()
or let io = io.connect()
i get the following error.
Uncaught ReferenceError: Cannot access 'io' before initialization
node.js code:
client code: