26 lines
527 B
JavaScript
26 lines
527 B
JavaScript
import core from 'pouchdb-core';
|
|
import idb from 'pouchdb-adapter-idb';
|
|
// import http from 'pouchdb-adapter-http';
|
|
// import replication from 'pouchdb-replication';
|
|
import find from 'pouchdb-find';
|
|
|
|
import { PouchType } from 'pouchtype';
|
|
import { B2Adapter } from './b2.js';
|
|
|
|
export const PouchDB = core
|
|
.plugin(idb)
|
|
// .plugin(http)
|
|
// .plugin(replication)
|
|
.plugin(find);
|
|
// .plugin(
|
|
// B2Adapter(
|
|
// B2_ACCOUNT,
|
|
// B2_API_KEY,
|
|
// B2_BUCKET_ID
|
|
// )
|
|
// );
|
|
|
|
export const db = new PouchDB('gallery');
|
|
|
|
self.db = db;
|