有人对塞内卡有经验吗?
当我试图包含网格的时候我有问题..。
这是哈皮路线:
server.route({
method: 'GET',
path: '/api/ping',
handler: function (req, reply) {
server.seneca// load the mesh plugin
.use('mesh')
// send a message out into the network
// the network will know where to send format:hex messages
.act('foo:1,v:2', (err: any, out: any) => {
console.log(err)
// prints #FF0000
reply(null, out)
})
}
})这是我的服务:
require('seneca')({
})
//.use('zipkin-tracer', {sampling:1})
.use('entity')
.use('ping-logic')
.ready(function(){
console.log(this.id)
})逻辑:
module.exports = function post(options) {
var seneca = this
seneca// provide an action for the format:hex pattern
.add( 'foo:1', function (msg, done) {
done( null, {x:1,v:100+msg.v} )
})
.use('mesh', { auto:true, pin:'foo:1' })
}我搞错了
失踪{ foo: 1,v: 2}
有人知道什么是色情吗?
发布于 2017-08-07 14:00:21
我也碰到过这个。我必须做两件事:
也请检查这个相关的github问题,在这个问题中,我问主要贡献者是否有计划在NPM上尽快推出一个新的固定版本:https://github.com/senecajs/seneca-mesh/issues/90
希望这能有所帮助
https://stackoverflow.com/questions/45358313
复制相似问题