HTML and CSS Reference
In-Depth Information
Figure 4.7. Planner application file layout
With prerequisites installed, but before you build the planner application, let's make sure
that WebSockets are working for you. In the next section you'll write a quick test page to
confirm that WebSockets are working correctly in Node and in the browser, before it all is
obscured by your application logic.
4.2.2. Creating a WebSocket with Node.js
Rather than deal with all the low-level, bit-by-bit data manipulation required by the We-
bSockets Protocol, you'll be using the WebSocket-Node module. It allows you to concen-
trate on the APIs involved rather than the mundane details of packing bits together in the
correct format—details described for you in appendix C . In this section you'll create two
• A JavaScript file to be run with Node.js
• An HTML page, which will be sent to the browser
Search WWH ::

Custom Search