budibase/packages/worker/src/db/index.js

15 lines
338 B
JavaScript
Raw Normal View History

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/"
const Pouch = PouchDB.defaults({
prefix: COUCH_DB_URL,
})
allDbs(Pouch)
2021-01-14 18:02:05 +01:00
module.exports = Pouch