Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
525 B

// const nano = require("nano")
const PouchDB = require("pouchdb")
const COUCH_DB_URL =
process.env.COUCH_DB_URL || "http://admin:password@localhost:5984"
// database can be "pouch" or "couch"
const CouchDB = ({ database, couchDbConnectionString }) => {
database = database || "couch"
couchDbConnectionString = couchDbConnectionString || COUCH_DB_URL
if (database === "couch") {
return PouchDB.defaults({
prefix: couchDbConnectionString,
})
}
// else setup for leveldb
}
module.exports = CouchDB