Creating a WebSocket server on a port also creates an HTTP server on that same port. You can see that onPageRequest gets called in the example, and that's exactly the same function that'd get called if you did http.createServer(onPageRequest).listen(8080);.
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.
It's just as shown here: http://www.espruino.com/ws#websocket-server
Creating a WebSocket server on a port also creates an HTTP server on that same port. You can see that
onPageRequest
gets called in the example, and that's exactly the same function that'd get called if you didhttp.createServer(onPageRequest).listen(8080);
.Hope that helps!