1.0.0 • Published 6 years ago
config-dburi v1.0.0
config-dburi
Get database uris for your config settings
Installation
npm i -S config-dburi
Use
const dburi = require('config-dburi')
console.log(dburi.mongo()) // mongodb://localhost/test
console.log(dburi.mongo('mydb')) // mongodb://localhost/mydb
console.log(dburi.redis()) // redis://localhost
console.log(dburi.postgres()) // postgres://postgres:mysecretpassword@localhost/postgres
console.log(dburi.postgres('mypassword')) // postgres://postgres:mypassword@localhost/postgres