denim-monk-db-factory
Version:
Helps to standardize our Monk DB configuration across projects
63 lines (40 loc) • 1.7 kB
Markdown
# denim-monk-db-factory
Factory utility for configuring monk db across platform applications
## Getting Started
`yarn add denim-monk-db-factory`
### Prerequisites
None
### Installing
Clone the repo
```
git clone https://github.com/denimlabs/denim-monk-db-factory.git
```
import
```
import { getMonkDb, makeDbOptions } from 'denim-monk-db-factory'
// DATABASE SETUP
const dbOptions = makeDbOptions(config.DB)
const db = getMonkDb(dbOptions)
//use db as a normal monk addapter
```
## Running the tests
`yarn test`
## Deployment
`yarn publish`
## Built With
* [node](https://nodejs.org/api/https.html) - Node 9.2.0
* [babel-cli](https://www.npmjs.com/package/babel-cli) - Used for transpiling and running es6
* [babel-preset-env](https://www.npmjs.com/package/babel-preset-env) - Used for transpiling and running es6
* [jest](https://www.npmjs.com/package/jest) - Testing framework
* [chai](http://chaijs.com/) - Assertion Library
* [husky](https://www.npmjs.com/package/husky) - Pre-commit hooks
* [lint-staged](https://www.npmjs.com/package/lint-staged) - Linting for changed files
* [monk](https://www.npmjs.com/package/monk) - Light Mongo ORM
* [fs](https://www.npmjs.com/package/fs) - node file system module
* [chalk](https://www.npmjs.com/package/chalk) - Colored console output
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/denimlabs/denim-ssl-factory/tags).
## Authors
* **Michael W. Clark** - *Initial work* - [MichaelWClark](https://github.com/michaelwclark)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details