Monday, 3 April 2017

hosting app nodejs with socket and sim900

i made app nodejs that receive data from module sim900 (tcp/ip packet) by using my ip address and port.It worked on my pc and router.Now i want hosting my app to server, i already try evennode and heroku but the only think i can do is load my website, i can not receive tcp packet from sim900. Is there any host allow me to do that or solution you can give me?

    var net =require("net");
    var server1 = net.createServer();
    server1.on("connection",function(socket){
      console.log("connect");
      socket.on("data",function(data){
                 console.log("data");  // get data from module sim 900
        });

        socket.on("close",function(){
          console.log("closed");
        });

        socket.on("error",function(){
          console.log("error");
        });
}
);
server1.listen(9000,function(){
   console.log("listen"); //start sv
});



via dante

No comments:

Post a Comment