Skip to content

Commit 8a68f02

Browse files
committed
Update readme
1 parent 6f012e5 commit 8a68f02

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

README.md

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -77,32 +77,6 @@ Completed
7777
}
7878
```
7979

80-
### Demo code hack
81-
82-
```js
83-
// this comes from the document in a <link /> tag
84-
const session = "";
85-
86-
// this is your user id on github
87-
const userId = "123";
88-
89-
const ws = new WebSocket(
90-
`wss://alive.github.com/_sockets/u/${userId}/ws?session=${session}`
91-
);
92-
93-
ws.onopen = function () {
94-
// handshake packet
95-
ws.send(
96-
JSON.stringify({
97-
subscribe: {
98-
[session]: "",
99-
},
100-
})
101-
);
102-
};
103-
104-
// listen for all messages
105-
ws.onmessage = function (data) {
106-
console.log(data);
107-
};
108-
```
80+
### Example
81+
82+
See demo in `client.ts`

0 commit comments

Comments
 (0)