moleculer-starter-kit
v0.14.8
Published
[![Moleculer logo](./banner-moleculer.png)](https://moleculer.services/)
Downloads
2
Readme
Architecture
Modules
- [x] moleculer: 0.14.8
- [x] moleculer-web: 0.9.1
- [x] Nats broker for moleculer
- [x] rabbitmq queues topology
Add a service
const debug = require('debug')('moleculer:runner')
const Runner = require('./')
const runner = new Runner()
runner.addService({
name: 'ServiceTest',
actions: {
TestCommand: {
metadata: {
rabbitmq: true
},
handler (ctx) {
return true
}
}
}
})
runner.on('success', () => {
debug('Run Forest, run!')
})
runner.run()
Add a middleware
const debug = require('debug')('moleculer:runner')
const Runner = require('./')
const runner = new Runner()
runner.addMiddleware({
name: 'MiddleTest',
...
})
runner.on('success', () => {
debug('Run Forest, run!')
})
runner.run()