In the previous chapter, we looked into Socket.io and WebSockets, to enable two-way communication between the server and the client. In this chapter, we'll discuss how to generate text and geolocation messages. We looked into generating newMessage and newLocationMessage objects and then writing test case for both type of messages.