{"action":"opened","issue":{"url":"https://api.github.com/repos/senecajs/seneca-transport/issues/147","repository_url":"https://api.github.com/repos/senecajs/seneca-transport","labels_url":"https://api.github.com/repos/senecajs/seneca-transport/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/senecajs/seneca-transport/issues/147/comments","events_url":"https://api.github.com/repos/senecajs/seneca-transport/issues/147/events","html_url":"https://github.com/senecajs/seneca-transport/issues/147","id":192173515,"number":147,"title":"Communication between Seneca microservices","user":{"login":"daemons88","id":1909591,"avatar_url":"https://avatars.githubusercontent.com/u/1909591?v=3","gravatar_id":"","url":"https://api.github.com/users/daemons88","html_url":"https://github.com/daemons88","followers_url":"https://api.github.com/users/daemons88/followers","following_url":"https://api.github.com/users/daemons88/following{/other_user}","gists_url":"https://api.github.com/users/daemons88/gists{/gist_id}","starred_url":"https://api.github.com/users/daemons88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daemons88/subscriptions","organizations_url":"https://api.github.com/users/daemons88/orgs","repos_url":"https://api.github.com/users/daemons88/repos","events_url":"https://api.github.com/users/daemons88/events{/privacy}","received_events_url":"https://api.github.com/users/daemons88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-29T02:42:46Z","updated_at":"2016-11-29T02:42:46Z","closed_at":null,"body":"Hi, i am new with this and try to make a server and client microservices with seneca all in the same pc using localhost, i can access the seneca add by browser or executing a act in the same file but when i try to get the response for other seneca microservice i get timeout or No matching action pattern found for...\r\n\r\nthis is my code in **\"Server\"**:\r\n\r\n//index\r\n\r\n`\r\n\"use strict\";\r\n\r\nconst Seneca = require('seneca');\r\nconst SenecaWeb = require('seneca-web');\r\nconst Express = require('express');\r\nconst Routes = require('./routes');\r\nconst ProvincePlugin = require('./provincePlugin');\r\nconst seneca = Seneca();\r\n\r\n\r\nvar config = {\r\n    routes: Routes,\r\n    context: Express(),\r\n    adapter: require('seneca-web-adapter-express')\r\n};\r\n\r\nseneca.use(ProvincePlugin)\r\n    .use(SenecaWeb, config)\r\n    .ready(() => {\r\n        const app = seneca.export('web/context')();\r\n        app.listen({\r\n            port: '4000',\r\n            host: 'localhost'\r\n        });\r\n        console.log('server started on: 4000');\r\n    });\r\n`\r\n\r\n//provincePlugin.js\r\n\r\n`\r\n\"use strict\";\r\n\r\nmodule.exports = function provincePlugin(options) {\r\n\r\n    var seneca = this;\r\n\r\n    seneca.add({\r\n        area: \"province\",\r\n        action: \"test\"\r\n    }, function(req, done) {\r\n        done(null, {\r\n            result: \"Hello World From Seneca\"\r\n        });\r\n    });\r\n}\r\n`\r\n\r\n//routes.js\r\n\r\n`\r\n\"use strict\";\r\n\r\nmodule.exports = [{\r\n    prefix: '/provinces',\r\n    pin: 'role:web,area:province,action:*',\r\n    map: {\r\n        test: {\r\n            GET: true\r\n        }\r\n    }\r\n}];\r\n`\r\n\r\nNow the **\"Client\"**:\r\n//Api\r\n`\r\n\"use strict\";\r\n\r\nconst Seneca = require('seneca');\r\nconst SenecaWeb = require('seneca-web');\r\nconst Express = require('express');\r\nconst Routes = require('./routes');\r\nconst ProvincePlugin = require('./provinceSeneca');\r\nconst seneca = Seneca();\r\n\r\nvar config = {\r\n  routes: Routes,\r\n  context: Express(),\r\n  adapter: require('seneca-web-adapter-express')\r\n};\r\n\r\nseneca.use(ProvincePlugin)\r\n  .use(SenecaWeb, config)\r\n  .ready(() => {\r\n    const app = seneca.export('web/context')();\r\n    app.listen({\r\n      port: '3500',\r\n      host: 'localhost'\r\n    });\r\n    console.log('server started on: 3500');\r\n\r\n    seneca.act('role:web,area:ui,action:test', console.log);\r\n  });\r\n`\r\n//provinceSeneca\r\n`\r\n\"use strict\";\r\n\r\nvar senecaProvince = require(\"seneca\")().client({\r\n  port: '4000',\r\n  host: 'localhost',\r\n  pin: 'role:web' \r\n});\r\n\r\nmodule.exports = function provinceSeneca(options) {\r\n\r\n  var seneca = this;\r\n\r\n  seneca.add({\r\n    area: \"ui\",\r\n    action: \"test\"\r\n  }, function(args, done) {\r\n    senecaProvince.act({\r\n      area: \"province\",\r\n      action: \"test\"\r\n    }, function(err, result) {\r\n      done(err, result);\r\n    });\r\n  });\r\n}\r\n`\r\n//routes\r\n`\r\n\"use strict\";\r\n\r\nmodule.exports = [{\r\n  prefix: '/api',\r\n  pin: 'role:web,area:ui,action:*',\r\n  map: {\r\n    test: {\r\n      GET: true\r\n    }\r\n  }\r\n}];\r\n`\r\n\r\nIn the client, provinceSeneca when do: require(\"seneca\")().client...\r\nIf i add pin: 'role:web'  i get No matching action pattern found for... \r\nIf i remove that i get timeout...\r\n\r\ni dont find the problem/solution for this in documentation, please can help me?\r\n\r\nRegards!!"}}
{"actor":{"display_login":"daemons88"}}