node package manager

rpc-node

Client rpc for nodejs

Simple rpc for node/express

Like this..

var express = require('express'), app = express();
var server = require('http').createServer(app)
  server.listen(85);
 
  require('./rpc-node.js')(app, {
  '/rpc/gettime'function(params){
  return {e: null, r:new Date()}
  }
  })
 
  app.get('/', function(r,s){
  s.sendfile('index.html')
  })
<script src='/rpc'></script>
<div id='timeis'/>
 
<script>
rpc('/rpc/gettime', function(e,r){
console.log(r)
document.getElementById('timeis').innerHTML = r;
}, null)
</script>