i am using socket.io for communication between server and client. My client side is not a html. My client side is javascript file. so here is my code of client side
var io = require('socket.io-client') var socket = io.connect('http://localhost:3000/home');
socket.on('connect', function () {
console.log(' Connected!');
});
On server side i have received the connection event but on client side connect event doesn't fire. I have tested through html way, it works but why its not working through a java script file.
via I.ali
No comments:
Post a Comment