Brief introduction
POUCHDB is a database that is inspired by Apache couchdb for web design and occupies less space. The goal of the POUCHDB project is to help developers build Web applications that are well-used both online and offline, where they can be stored locally when the application is off-line, and synchronize the data with COUCHDB and other compatible servers when the online status is restored.
Pouchdb is actually a JavaScript library with a size of 131KB in the compressed format. At present, it can do the basic tasks: database creation, query, copy and delete, document (set) creation, acquisition, update and delete, query database information and listen to database changes.
Main Features:
- Lightweight, only 25KB after compression
- Cross browser, support Firefox 12+,chrome 19+,opera 12+,safari 5+,internet Explorer
- Support for node. js
- Support for Apache Cordova
Using POUCHDB
Official Micro document here: documentation, there are API documentation, you can refer to learning.
var db = new Pouchdb (' dbname '); Db.put ({_id: ' [email protected] ', Name: ' David ', age:66}); Db.changes (). On (' Change ', function () { console.log (' ch-ch-changes ');}); Db.replicate.to (' http://example.com/mydb ');
Official website: http://pouchdb.com/
GitHub site: https://github.com/pouchdb/pouchdb
Pouchdb:javascript Synchronizing databases