forked from tsai/budibase
5 changed files with 20 additions and 12 deletions
@ -1,12 +1,9 @@ |
|||||
const PouchDB = require("pouchdb") |
let Pouch |
||||
const env = require("../environment") |
|
||||
|
|
||||
// level option is purely for testing (development)
|
module.exports.getDB = () => { |
||||
const COUCH_DB_URL = |
return Pouch |
||||
env.COUCH_DB_URL || "http://budibase:budibase@localhost:10000/db/" |
} |
||||
|
|
||||
const Pouch = PouchDB.defaults({ |
module.exports.setDB = pouch => { |
||||
prefix: COUCH_DB_URL, |
Pouch = pouch |
||||
}) |
} |
||||
|
|
||||
module.exports = Pouch |
|
||||
|
|||||
Loading…
Reference in new issue