You are reading a single comment by @Wilberforce and its replies. Click here to read the full conversation.
  • This fires up a web server and attempts to listen to DNS requests on port 53:

    var counter = 1;
    var wifi=require("wifi");
    wifi.startAP('ESP');
    
    
    function getPage(req,res) {
      console.log(req.url);
        res.writeHead(200, {'Content-Type': 'text/html'});
        res.write('<html><head><meta http-equiv="refresh" content="5"></head><body><img src="favicon.ico"/>'+(counter++)+'</body­></html>');
    
      res.end();
    }
    
    require("http").createServer(getPage).li­sten(80);
    
    var net=require('net');
    
    
    function callbackdata(data) {
      console.log({data:data});
    }
    
    net.createServer(callbackdata).listen(53­);
    
About

Avatar for Wilberforce @Wilberforce started