# rpc-duplex-node

> Client rpc for nodejs

Latest version **0.1.4** (published 2012-12-24) · 0 weekly downloads

## Install

```sh
npm install rpc-duplex-node
pnpm add rpc-duplex-node
yarn add rpc-duplex-node
bun add rpc-duplex-node
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2012-12-24 |
| First published | 2012-12-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | C Borkert |
| Maintainers | dpweb |
| Keywords | util, nodejs, rpc |

## Links

- npm: https://www.npmjs.com/package/rpc-duplex-node
- Repository: https://github.com/dpweb/rpc-duplex-node
- npm.io page: https://npm.io/package/rpc-duplex-node

## Dependencies (2)

- [ws](https://npm.io/package/ws.md)
- [express](https://npm.io/package/express.md) 3.0.x

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2012-12-24
- 0.1.3 — 2012-12-24
- 0.1.2 — 2012-12-24
- 0.1.1 — 2012-12-24
- 0.1.0 — 2012-12-24
- 0.0.2 — 2012-12-22
- 0.0.1 — 2012-12-10

## README

###rpc-duplex-node    
Simple rpc for node/express.  Uses websocket if browser supported, else polling.   

Like this..    
    
###app.js
````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'/>
````

---
_Source: https://npm.io/package/rpc-duplex-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
