https://github.com/droplit/universal-ws
A WebSocket transport library for node and browsers
https://github.com/droplit/universal-ws
nodejs-library websocket-library
Last synced: 24 days ago
JSON representation
A WebSocket transport library for node and browsers
- Host: GitHub
- URL: https://github.com/droplit/universal-ws
- Owner: droplit
- License: mit
- Created: 2018-07-06T19:28:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T23:29:31.000Z (over 3 years ago)
- Last Synced: 2025-10-03T13:36:42.838Z (5 months ago)
- Topics: nodejs-library, websocket-library
- Language: TypeScript
- Homepage:
- Size: 1.82 MB
- Stars: 6
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/universal-ws)
[](https://www.npmjs.com/package/universal-ws-server)

# universal-ws
An Isomorphic transport layer library for both node and browsers. Built on [ws](https://github.com/websockets/ws) and native browser [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) implementations.
### Features
In addition to standard websocket features, `universal-ws` provides:
* Server-to-Client Heartbeat
* Request-Response bidirectionally
* Connection authentication
## Getting started
This library is comprised of a client and server module:
* [Client Docs](./client/)
* [Server Docs](./server/)
## Testing
### run all tests
```
npm test
```
> To run browser tests, install optional dependencies
### Unit tests
```
npm run unit-test
```
### System tests
```
npm run system-test
```
### Browser tests
```
npm install nightwatch chromedriver -G
npm run browser-test
```