Skip to content

Commit 97aef5b

Browse files
committed
docs(readme): add readme file
1 parent 4bd1379 commit 97aef5b

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

README.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
1-
# Websocket client
1+
<h1 align="center">Websocket Client</h1>
22

3-
```
4-
const ws = adonisWs('ws://localhost:8000')
3+
<div align="center">🚀 (4KB gzipped)</div>
4+
<div align="center">
5+
<strong>Websocket client for AdonisJs.</strong>
6+
<p>This repo contains a simple to use Jabascript client to connect with the AdonisJs websocket server.</p>
7+
</div>
58

6-
ws.on('open', function () {
7-
ws
8-
.subscribe('chat:watercooler')
9-
.then((subscription) => {
10-
subscription.on('')
11-
subscription.on('leave')
12-
})
13-
.catch((error) => {
14-
})
15-
})
9+
<br />
1610

17-
ws.on('close', function () {
18-
})
11+
<div align="center">
12+
<a href="https://travis-ci.org/adonisjs/adonis-websocket-client">
13+
<img src="https://img.shields.io/travis/adonisjs/adonis-websocket-client.svg?style=for-the-badge" alt="Travis" />
14+
</a>
15+
</div>
1916

20-
ws.on('error', function () {
21-
})
22-
```
17+
<br />
18+
19+
<div align="center">
20+
<h3>
21+
<a href="https://adonisjs.com/docs/websocket">
22+
Official Docs
23+
</a>
24+
<span> | </span>
25+
<a href="https://github.com/adonisjs/adonis-websocket-vue">
26+
Vue Plugin
27+
</a>
28+
</h3>
29+
</div>
30+
31+
<div align="center">
32+
<sub>Used by adonisjs.com. Built with ❤︎ by <a href="https://github.com/thetutlage">Harminder Virk</a>
33+
</div>

0 commit comments

Comments
 (0)