PouchDB – Synchronization You can synchronize the databases stored locally in PouchDB with those that are stored in CouchDB. In the previous chapter, we have seen how to replicate databases using PouchDB. There we have used the method PouchDB.replicate(source, destination). In addition to this, we can also replicate the data, from the local database to […]
PouchDB – Adding Attachment You can attach a binary object to a document using the putAttachment() method in PouchDB. Syntax Following is the syntax of the putAttachment(). To this method, we have to pass the document id, attachment id, MIME type along with the attachment. This method also accepts an optional callback function. db.putAttachment( docId, […]
PouchDB – Replication One of the most important features of PouchDB is replication, i.e. you can make a copy of a database. You can replicate either a PouchDB instance stored locally or a CouchDB instance stored remotely. Syntax Following is the syntax of replicating a database in PouchDB. Here, a copy of the source database […]