A Hapi plugin for monk
npm install --save hapi-monk
This plugin simply exposes all monk
database methods. It also exposes the created database options
property. The point is to share the same connection across all plugins in a Hapi
application.
option | required | default | description |
---|---|---|---|
url | false | mongodb://localhost:27017 | MongoDB connection string |
{
"pack" : {},
"plugins" : {
"hapi-monk" : {
"url" : "$env.DATABASE_URL"
}
},
"servers" : [
{
"host" : "$env.HOST",
"port" : "$env.PORT"
}
]
}