Skip to content

Commit 7174dfc

Browse files
committed
A new look
1 parent 23b1ea8 commit 7174dfc

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎README.md‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,49 @@
88
</div>
99

1010
#### In a nutshell.
11-
µWebSockets.js is the Google V8 bindings to [µWebSockets](https://github.com/uNetworking/uWebSockets), one of the most efficient web servers available for C++ programming<sup>[[2]](https://github.com/uNetworking/uWebSockets/tree/master/benchmarks)</sup>. Bypassing the entire I/O stack of Node.js allows for unprecedented efficiency in back-end JavaScript - what you build stands on nothing but the best of C and C++. Scales to millions of active WebSockets using half a GB of user space memory<sup>[[3]](https://medium.com/@alexhultman/millions-of-active-websockets-with-node-js-7dc575746a01)</sup>.
1211

13-
```
14-
npm install uNetworking/uWebSockets.js#v15.9.0
15-
```
16-
17-
, or any such tag (see [releases](https://github.com/uNetworking/uWebSockets.js/releases)).
18-
19-
20-
#### Simple.
2112
There are tons of [examples](examples) but here's the gist of it all:
2213

2314
```javascript
24-
const uWS = require('uWebSockets.js');
15+
/* Non-SSL is simply App() */
16+
require('uWebSockets.js').SSLApp({
2517

26-
/* Non-SSL is simply uWS.App() */
27-
uWS.SSLApp({
2818
/* There are tons of SSL options */
2919
key_file_name: 'misc/key.pem',
3020
cert_file_name: 'misc/cert.pem',
21+
3122
}).ws('/*', {
23+
3224
/* For brevity we skip the other events */
3325
message: (ws, message, isBinary) => {
3426
let ok = ws.send(message, isBinary);
3527
}
28+
3629
}).any('/*', (res, req) => {
30+
3731
/* Let's deny all Http */
3832
res.end('Nothing to see here!');
33+
3934
}).listen(9001, (listenSocket) => {
35+
4036
if (listenSocket) {
4137
console.log('Listening to port 9001');
4238
}
39+
4340
});
4441
```
4542

43+
#### Ready all thrusters.
44+
45+
Install with `npm install uNetworking/uWebSockets.js#v15.10.0` or any such [release](https://github.com/uNetworking/uWebSockets.js/releases). No compiler needed.
46+
47+
![](misc/features_strip.png)
48+
4649
#### Pay what you want.
4750
Commercially developed on a sponsored/consulting basis; BitMEX, Bitfinex and Coinbase are current or previous sponsors. Contact [me, the author](https://github.com/alexhultman) for support, feature development or consulting/contracting.
4851

4952
![](https://raw.githubusercontent.com/uNetworking/uWebSockets/master/misc/2018.png)
5053

54+
#### Know thy legal matters.
55+
5156
*µWebSockets.js is intellectual property licensed Apache 2.0 with limitations on trademark use. Forks must be clearly labelled as such and must not be confused with the original.*

‎misc/features_strip.png‎

73.3 KB
Loading

0 commit comments

Comments
 (0)