pouchdb-server
pouchdb-server copied to clipboard
Give a working example of using sqldown with a connection string?
I am trying to do something akin to ./node_modules/.bin/pouchdb-server --level-backend sqldown --level-prefix "$DATABASE_URL"
where
DATABASE_URL=postgres://username:password@localhost:5432/databasename
Fauxton does not work...
(node:46947) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I've installed things correctly (I think)...
npm install --save pouchdb-server pg pg-query-stream sqldown
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
updated 4 packages in 3.651s
@shutej Did you manage to find a solution for this?
I seem to be having a similar problem.
node_modules/.bin/pouchdb-server --level-backend sqldown --level-prefix postgres://username:password@localhost:5432/pouchtest
(node:31529) UnhandledPromiseRejectionWarning: Error: Invalid Adapter: postgres at PouchAlt.PouchDB (/home/noah/Projects/pouchdbtest/node_modules/pouchdb-core/lib/index.js:1292:11) at new PouchAlt (/home/noah/Projects/pouchdbtest/node_modules/pouchdb-core/lib/index.js:1412:13) at /home/noah/Projects/pouchdbtest/node_modules/express-pouchdb/lib/create-or-delete-dbs.js:30:10 (node:31529) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:31529) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [info] pouchdb-server has started on http://127.0.0.1:5984/ [info] using alternative backend: sqldown [info] all databases will be created with prefix: postgres://postgres:postgres@localhost:5432/pouchtest [info] navigate to http://127.0.0.1:5984/_utils for the Fauxton UI.