0.1.4 • Published 11 years ago

rpc-duplex-node v0.1.4

Weekly downloads
30
License
-
Repository
github
Last release
11 years ago

###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'/>
0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago