Last active
August 29, 2015 14:02
-
-
Save shanlalit/1a7c6c8fa3a47fdc3c85 to your computer and use it in GitHub Desktop.
Seneca Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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