Testing the newEmail event

If I go to the browser and give things a refresh using command + R, we see over inside the console that we have New email, and below this we have Object. We can click on Object to expand it and we see all of the properties we specified:

We have our from property, the text property, and our createdAt property. All of it is showing up as expected, which is fantastic! In real time, we were able to pass not only an event, but event data from the server to the client, which is something we could never do with an HTTP API.

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.