2020-04-24 10:54:20 +02:00
|
|
|
const PouchDB = require("pouchdb")
|
2020-04-24 18:28:32 +02:00
|
|
|
require("pouchdb-all-dbs")(PouchDB)
|
2020-04-07 16:12:08 +02:00
|
|
|
|
2020-04-24 18:28:32 +02:00
|
|
|
module.exports = () => {
|
|
|
|
const COUCH_DB_URL =
|
|
|
|
process.env.COUCH_DB_URL || "http://admin:password@localhost:5984"
|
|
|
|
const DATABASE_TYPE = process.env.DATABASE_TYPE || "couch"
|
2020-04-07 16:12:08 +02:00
|
|
|
|
2020-04-24 18:28:32 +02:00
|
|
|
PouchDB.defaults({
|
|
|
|
prefix: COUCH_DB_URL,
|
|
|
|
})
|
2020-04-23 15:37:08 +02:00
|
|
|
|
2020-04-24 18:28:32 +02:00
|
|
|
return PouchDB
|
|
|
|
}
|