2021-01-14 18:01:31 +01:00
|
|
|
const PouchDB = require("pouchdb")
|
|
|
|
const allDbs = require("pouchdb-all-dbs")
|
|
|
|
const env = require("../environment")
|
|
|
|
|
|
|
|
// level option is purely for testing (development)
|
2021-03-22 17:18:29 +01:00
|
|
|
const COUCH_DB_URL = env.COUCH_DB_URL || "http://localhost:10000/db/"
|
2021-01-14 18:01:31 +01:00
|
|
|
|
|
|
|
const Pouch = PouchDB.defaults({
|
|
|
|
prefix: COUCH_DB_URL,
|
|
|
|
})
|
|
|
|
|
|
|
|
allDbs(Pouch)
|
|
|
|
|
2021-01-14 18:02:05 +01:00
|
|
|
module.exports = Pouch
|