Nodejs remote procedure call supporting multiple transports
eureca (Easy Unobstructive REmote CAll) is a node.js bidirectional RPC library using Primus.io as a network layer.
it allow you to call server side function from a browser or nodejs client and vice-versa.
please visit the project web page for more code samples http://eureca.io/
WebRTC support was added in version 0.6.4 : it's based on nodejs WebRTC stack node-webrtc.
The documentation work is in progress you can see it here http://eureca.io/doc/
var Eureca = require'eureca.io';var eurecaServer = ;console.log'Hello Server from 'userName;
<script src="/eureca.js"></script><body><script>var client = ;clientreadyserverProxyhelloServer; //will call helloServer in the server side;</script></body>
var Eureca = require'eureca.io';var client = uri: '' ;clientreadyserverProxyhelloServer;;
please check node_modules/eureca.io/examples/ for some example codes
open a terminal window and type and cd to node_modules/eureca.io/examples/1-http-server/
node --harmony-proxies server.js
note the usage of --harmony-proxies command line argument, this switch enables harmony proxies witch is used by eureca.io library (for more information about harmony proxies see this link http://wiki.ecmascript.org/doku.php?id=harmony:proxies) if you don't use --harmony-proxies, eureca will still work using a workaround but this is not recommanded.
now you can either open a browser window on http://localhost:8000/ or open another terminal window in the same directory and call open a terminal window and type and cd to node_modules/eureca.io/examples/1-http-server/
node --harmony-proxies client.js
you should see 'Hello from client' on the server side.
The MIT License (MIT)Copyright (c) 2014 EzeliaPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.