https://github.com/web-mech/peerjs-nodejs
A peerjs client that works within nodejs apps
https://github.com/web-mech/peerjs-nodejs
Last synced: about 1 month ago
JSON representation
A peerjs client that works within nodejs apps
- Host: GitHub
- URL: https://github.com/web-mech/peerjs-nodejs
- Owner: web-mech
- License: mit
- Created: 2018-01-19T21:15:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-20T20:25:41.000Z (over 7 years ago)
- Last Synced: 2025-03-26T16:11:53.494Z (about 2 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# peerjs-nodejs
A peerjs client that works within nodejs apps
## Usage
```
const peerJs = require('peerjs-nodejs');const peer = peerJs({ key: 'abcxyz' });
//or
const peer = peerJs(id, { ...options });
```### A word on connections
Binary data serialization currently isn't supported with the current dependencies. ( probably still possible, just not as is). You must set the connection serialization to either `none` or `json`
See Documentation:
http://peerjs.com/docs/#dataconnection-serialization
```
let conn = peer.connect('foo');
conn.serialization = 'json';
conn.send({ value: 'hello' });
```