Get started with pouchdb CDN
Apache-2.0 licensed
JS database: PouchDB syncs changes with CouchDB or other PouchDB instances via replication.
Tags:- db
- couchdb
- pouchdb
Stable version
Copied!
How to start using pouchdb CDN
// Include PouchDB from the CDN
const PouchDB = require('pouchdb')(window.PouchDB.noConflict(true).constructor);
// Initialize a new database instance
const db = new PouchDB('myDatabaseName');
// Save a document
db.put({
title: 'Hello PouchDB',
content: 'This is a sample document.'
})
.then(function(response) {
console.log('Document saved with ID:', response.id);
})
.catch(function(err) {
console.error('Error saving document:', err);
});
// Get a document
db.get('myDocumentId')
.then(function(doc) {
console.log('Retrieved document:', doc);
})
.catch(function(err) {
console.error('Error retrieving document:', err);
});
Copied!
Copied!
All versions
1.0.0
1.1.0
2.0.0
2.0.1
2.0.2
2.1.0
2.1.1
2.1.2
2.2.0
2.2.1
2.2.2
2.2.3
3.0.1
3.0.2
3.0.3
3.0.4
3.0.5
3.0.6
3.1.0
3.2.0
3.2.1
3.3.0
3.3.1
3.4.0
3.5.0
3.6.0
4.0.0
4.0.1
4.0.2
4.0.3
5.0.0
5.1.0
5.2.0
5.2.1
5.3.0
5.3.1
5.3.2
5.4.0
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
6.0.0
6.0.1
6.0.2
6.0.3
6.0.4
6.0.5
6.0.6
6.0.7
6.1.0
6.1.1
6.1.2
6.2.0
6.2.1-prerelease
6.3.0
6.3.1
6.3.2
6.3.3
6.3.4
6.4.0
6.4.1
6.4.2
6.4.3
7.0.0
7.1.0
7.1.1
7.2.0
7.2.1
7.2.2
7.3.0
7.3.1
8.0.0
8.0.1
*** 9.0.0