Skip to content

Drivetech/config-dburi

Repository files navigation

config-dburi

npm version npm downloads Build Status Coverage Status Code Climate dependency Status devDependency Status

Get database uris for your config settings

Installation

npm i -S config-dburi

Use

Try on Tonic

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

License

MIT

About

Get database uris for your config settings

Resources

License

Stars

Watchers

Forks

Packages

No packages published