http.createServer creates an HTTP server, which parses the headers of the HTTP request for you, net.createServer is a plain TCP/IP one.
To be honest, if @JumJum's code can use the built in HTTP server that's awesome, and I take back everything I said about the JS implementation :) it might actually be the best way to do it if you can use the existing HTTP server with it.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
http.createServer
creates an HTTP server, which parses the headers of the HTTP request for you,net.createServer
is a plain TCP/IP one.To be honest, if @JumJum's code can use the built in HTTP server that's awesome, and I take back everything I said about the JS implementation :) it might actually be the best way to do it if you can use the existing HTTP server with it.