Summary

Our app now looks and feels like a real application. We went from little knowledge of Express to actually using it to build a small yet fully functional site. At this point, we now know how to respond to different HTTP methods. We know how to wire up routes in a clean and extendable manner. Our app has 14 different pieces of middleware. This might seem like a lot, but our app is also doing a lot. We can use templates and partials to render our pages easily. Finally, we have a simple authentication system that uses sessions. We laid a very good base for our chat application, all in just over 40 lines, in our app.js.

In our next chapter, we will cover how to add real-time communication between the server and the browser using Socket.io.

Get Building Scalable Apps with Redis and Node.js 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.