Nodejs remote procedure call supporting multiple transports

eureca (Easy Unobstructive REmote CAll) is a node.js bidirectional RPC library using 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

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


Hello World example

var Eureca = require('');
var eurecaServer = new Eureca.Server();
eurecaServer.exports.helloServer = function (userName) {
    console.log('Hello Server from ',userName);
<script src="/eureca.js"></script>
var client = new Eureca.Client(); 
client.ready(function (serverProxy) {
    serverProxy.helloServer();  //will call helloServer in the server side 
var Eureca = require('');
var client = new Eureca.Client({ uri: 'http://localhost:8000/' });
client.ready(function (serverProxy) {

More examples

please check node_modules/ for some example codes

open a terminal window and type and cd to node_modules/

     node --harmony-proxies server.js

note the usage of --harmony-proxies command line argument, this switch enables harmony proxies witch is used by library (for more information about harmony proxies see this link 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/

     node --harmony-proxies client.js

you should see 'Hello from client' on the server side.

TODO / Roadmap

  • More examples/tutorials


The MIT License (MIT)
Copyright (c) 2014 Ezelia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.