Using a database
We've successfully moved our application's data to an encapsulated endpoint, which is great. Now that we've done that, we can start thinking about making that data dynamic. Right now it's stored in a static code file. This is fine when none of the data needs to change, but if we want our application to be interactive, we'll need a way to work with the data. It's time to use a database.
There are many powerful database solutions available, from SQL options such as MySQL and Postgres, to a newer breed of NoSQL engines such as MongoDB and CouchDB, plus simple key-value stores such as Redis and Riak. Almost all popular database engines have drivers available for Node. However, we're going to use a simpler option. We'll be using a database ...
Get CoffeeScript Application 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.