tb-moleculer-db-adapter-mongoose
v0.0.1
Published
- `npm install mongoose --save` - `npm install tb-moleculer-db-adapter-mongoose --save`
Downloads
1
Readme
Install
npm install mongoose --save
npm install tb-moleculer-db-adapter-mongoose --save
Usage
const mongooseDBMixin = require('tb-moleculer-db-adapter-mongoose')
const Conversation = require('../conversation') // Mongoose Model
module.exports = {
name: 'conversations',
mixins: [mongooseDBMixin()],
settings: {
idField: 'id',
fields: ['id', 'name', 'data']
},
model: Conversation
}