3.0.1 • Published 3 years ago
moleculer-sf-mixin-db v3.0.1
moleculer-sf-mixin-db
mongoose adapter for
moleculer-sf
export as plugin of moleculer-sf
you need setup process.env.MONGO_URI
or service.settings.mongoURI
Changes
v2
disable auto pluralize modelName by serviceName
// if serviceSchema.modelName is null
const modelName = serviceSchema.name.replace(/\$/g, '')
Usage
// service-factory.js
const moleculer = require('moleculer')
const moleculerServiceFactory = require('moleculer-sf')
const moleculerSfMixinDb = require('moleculer-sf-mixin-db')
// global all factory plugins
const plugins = [
// 'mixin-db', // or just string without prefix - v1
moleculerSfMixinDb(false), // as function
]
module.exports = moleculerServiceFactory(moleculer, plugins)
3.0.1
3 years ago
3.0.0
3 years ago
2.1.1
3 years ago
2.1.0
3 years ago
2.0.2
4 years ago
3.0.0-alpha.1
4 years ago
3.0.0-alpha.0
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.0.8
4 years ago
2.0.0-alpha.0
4 years ago
2.0.0-alpha.1
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago