concept chat message in category node

appears as: chat messages, chat message, chat messages
Get Programming with Node.js

This is an excerpt from Manning's book Get Programming with Node.js.

With this chat page set up, you need to remember the tag IDs that you used in the HTML. In the next section, you target the #chat box with chat messages and send new messages found in #chat-input to the server.

You have a chat page working, finally allowing users to talk to one another. As soon as a user refreshes their page, their chat history is gone. Although this feature could be marketed as a security implementation, it’s impractical. You want to save the message and do so without interrupting the fast-paced, event-driven system on which your chat application functions. In this lesson, you use Mongoose and your existing application structure to support saving and loading chat messages.