I have clone the project and ran it but it did not connected with the server. I have used node server but it failed to connect.Please have look at the code.
Node js :
var server = http.createServer(function(req,res){
res.end('hello node');
}).listen(8008, function(){
console.log('HTTP Express server listening on port 8008');
})
socketIO = new SocketIO(server, {})
socketIO.connect();
When we call connect() function , actually it should fire connection event , which will be listening on server. But it's not opening connection with server.Help me out please
Hi all,
I have clone the project and ran it but it did not connected with the server. I have used node server but it failed to connect.Please have look at the code.
Node js :
var server = http.createServer(function(req,res){ res.end('hello node'); }).listen(8008, function(){ console.log('HTTP Express server listening on port 8008'); })
var sockerIO = require('socket.io')(server);
sockerIO.on('connection',function(socket){ console.log("socket "+socket); })
Nativescript :
let socketIO; const server = 'http://localhost:8008';
socketIO = new SocketIO(server, {}) socketIO.connect();
When we call connect() function , actually it should fire connection event , which will be listening on server. But it's not opening connection with server.Help me out please