seneca-load-balancer
Version:
A seneca service that will allow you to easily manage multiple running services with the same patterns
30 lines (25 loc) • 469 B
JavaScript
var Seneca = require('seneca')
var seneca = Seneca()
seneca.use(require('..'), conf())
seneca.listen({port: 10100})
function conf () {
return {
services: [
{
pattern: { a: '1' },
locations: [
{
host: 'localhost',
port: '10201',
spec: 'http'
},
{
host: 'localhost',
port: '10202',
spec: 'http'
}
]
}
]
}
}