Chapter 3. Building a One-on-One Chat Bot - The "Hello World" of XMPP
Almost every programming language and framework has its own version of the "Hello World" program. XMPP frameworks are no different, and the equivalent to writing "Hello World" in XMPP is creating an echo bot, a simple XMPP client that simply returns any message it receives to the original sender.
In this chapter, we will build a simple echo bot on the server side using a node-xmpp-client
. We will send messages to it from a standard XMPP client, and we will see the messages being echoed back. In the process, we will explore how client-to-server (C2C) streams work in XMPP.