Skip to content

Instantly share code, notes, and snippets.

@shanlalit
Last active August 29, 2015 14:02
Show Gist options
  • Save shanlalit/1a7c6c8fa3a47fdc3c85 to your computer and use it in GitHub Desktop.
Save shanlalit/1a7c6c8fa3a47fdc3c85 to your computer and use it in GitHub Desktop.
Seneca Client
var seneca = require('seneca')()
//send any actions it can not match locally out over the network
//Change 127.0.0.1 to server ip
seneca.client({host:'127.0.0.1'})
seneca.use('transport',{
pins:[ {role:'math',cmd:'product'} ]
})
seneca.act({role:'math', cmd:'product', left:3, right:4},
function(err,result) {
if( err ) return console.error( err )
console.log(result)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment