The Chattrbox Client Application
You already built the Chattrbox server, which serves out the static files and handles communication over WebSockets. The client application will send and receive messages to and from the server over WebSockets. It will define a format for individual messages. The user will be able to view the messages in a list as well as create new messages by entering text into a form.
Those responsibilities will be handled by three modules:
-
the ws-client module will manage the WebSockets communication for the client
-
the dom module will display data to the UI and handle form submissions
-
the app module will define the structure of messages and pass messages between ws-client and dom
Figure 17.5 diagrams ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access