Update README.md
This commit is contained in:
parent
720a45dd9b
commit
47e66cccbb
21
README.md
21
README.md
@ -1,6 +1,25 @@
|
|||||||
# uWebSockets-node
|
<div align="center">
|
||||||
|
<img src="https://github.com/uNetworking/v0.15/blob/master/misc/logo.png?raw=true" />
|
||||||
|
|
||||||
|
*µWS ("[micro](https://en.wikipedia.org/wiki/Micro-)WS") **for Node.js** is simple and efficient*<sup>[[1]](benchmarks)</sup> *messaging for the modern web.*
|
||||||
|
|
||||||
|
• [Read more](https://github.com/uNetworking/v0.15)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
This repository tracks the development of Node.js bindings for µWebSockets v0.15.
|
This repository tracks the development of Node.js bindings for µWebSockets v0.15.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
const uWS = require('...lalala');
|
||||||
|
|
||||||
|
const app = uWS.SSLApp({
|
||||||
|
cert: 'my_cert.pem',
|
||||||
|
key: 'my_key.pem'
|
||||||
|
}).get('/whatsmy/useragent', (res, req) => {
|
||||||
|
res.end('Hello ' + req.getHeader('user-agent'));
|
||||||
|
}).get('/*', (res, req) => {
|
||||||
|
res.end('Hello otherwise!');
|
||||||
|
}).listen(3000, 0, (token) => {
|
||||||
|
console.log('Listening to port 3000');
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user