The inner workings and background info on replication won't be covered in detail in this section, but you can find a full walkthrough in the bonus chapter titled Replicating your data, which is available on the Packt Publishing website.
To give you a quick overview, replication is the way that CouchDB transports data between one server and another. Replication is driven by the _rev
field that lives in each document, the _rev
field makes sure that your server knows which version has the correct data to use.
In this section, we'll replicate both the _users
and verge
databases so that all of our local data is available on the production server. You don't have to worry if your application has been live for a few minutes or even a few days, as the best part of replication is that if someone is already using your application, then all of their data will remain intact; we'll just be adding our local data.