July 2017
Intermediate to advanced
656 pages
16h 1m
English
HTTP was not made for the kind of real-time web applications that many developers are creating today. As a result, all sorts of workarounds have been discovered to mimic the idea of bidirectional, uninterrupted communication between servers and clients.
WebSockets don't mimic this behavior; they provide it.
In this recipe, we will use the third-party ws module to create a pure WebSocket server that will receive and respond to WebSocket requests from the browser.