Using RethinkDB in Node.js web applications

When you develop web applications of any kind, more than often, you will need a database to store data in. Without a proper persistence layer, only basic web apps can be built. In Chapter 5, Programming RethinkDB in Node.js, you learned how to connect to a RethinkDB cluster and run queries from a Node.js script. In this chapter, we're going to use the same syntax to use RethinkDB within an Express.js web app.

Fortunately, adding database connectivity capability to Express.js web apps is just a matter of loading an appropriate Node.js driver for the database in your app; however, you maybe wondering where exactly we put the code that interacts with the database, in the context of our Express.js web application. ...

Get Getting Started with RethinkDB 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.