levshkatov levshkatov - 1 month ago 6
Android Question

Debug a server for android on nodejs

I'm trying to create a

node js
server for android phones. How can I create it at home in a local network without outer internet connections? I have wifi at home so my phone can connect to local network. I use official
tutorial and I don't know what to write here (instead of

private Socket mSocket;
try {
mSocket = IO.socket("http://chat.socket.io");
} catch (URISyntaxException e) {}


open command prompt on your PC and hit ipconfig. note down your wireless IP address. Let's assume it to be you can also set a static IP for your PC on your router. Next from your socket io code check what port number you are using. for example

http.listen(3000, function(){
  console.log('listening on *:3000');

says that you are using port 3000.

Hence in your Android code you need to use