mongoose-helpers-get-uri
v0.1.1
Published
a mongoose helper that constructs a mongoose connection uri
Downloads
3
Maintainers
Readme
mongoose-helpers-get-uri
a mongoose helper that constructs a mongoose connection uri
table of contents
installation
npm install mongoose-events-event-logger
api
/**
* @param {Object} user_options
* @param {string} [user_options.database]
* @param {string} [user_options.host]
* @param {string} [user_options.password]
* @param {number} [user_options.port]
* @param {string} [user_options.username]
*
* @returns {string}
*/
getUri( user_options )
usage
basic
var getUri = require( 'mongoose-helpers-get-uri' )
var options = {
uri: {
database: config.database,
password: config.password,
username: config.username
}
}
var uri = getUri( options.uri )