rdn

rpc-duplex-node

Client rpc for nodejs

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

1

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

###rpc-duplex-node
Simple rpc for node/express

Like this..

###app.js

    var express = require('express'), app = express();
    var server = require('http').createServer(app)
    server.listen(85);


    var allin = require('./rpc-duplex-node.js')(app);
    allin.log = console.log;

    // Send some calls to the clients using clientcall()
    function doit(){
        allin.clientcall('document.getElementById("timeis").innerHTML=new Date()')
    }
    setInterval(doit, 1000);


    app.get('/', function(r,s){
        s.sendfile('index.html')
    })

###index.html

<!-- include the script -->
<script src='/rpc'></script>

<div id='timeis'/>

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial