exframe-db
v3.4.3
Published
Framework module for mongo
Downloads
4,907
Readme
exframe DB Module
A wrapper around mongoose to provide database connection for the Harmony Framework.
###Features
- Mongoose connection
- Exframe-Service Graceful Shutdown
###Use
const db = require('exframe-db')
Full Example
const db = require('exframe-db')
const logger = require('exframe-logger').create(process.env.LOGSENE_TOKEN || 'token');
db.init({ logger, dbUrl: 'mongodb://localhost:27017/harmony' });
Methods
init()
Syntax
db.init({ logger, dbUrl: 'mongodb://localhost:27017/harmony' });
Parameter Values
logger Required. logger object.
dbUrl Required. database connection string
###Tests
npm run test
npm run unit-test