You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-40Lines changed: 4 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -10,43 +10,11 @@
10
10
11
11
[](https://saucelabs.com/u/socket)
12
12
13
-
## How to use
13
+
## Documentation
14
14
15
-
A standalone build of `socket.io-client` is exposed automatically by the
16
-
socket.io server as `/socket.io/socket.io.js`. Alternatively you can
17
-
serve the file `socket.io.js` found in the `dist` folder or include it via [CDN](https://cdn.jsdelivr.net/npm/socket.io-client@2/dist/socket.io.js).
15
+
Please see the documentation [here](https://socket.io/docs/v3/client-initialization/).
18
16
19
-
```html
20
-
<scriptsrc="/socket.io/socket.io.js"></script>
21
-
<script>
22
-
var socket =io();
23
-
socket.on('connect', function(){});
24
-
socket.on('event', function(data){});
25
-
socket.on('disconnect', function(){});
26
-
</script>
27
-
```
28
-
29
-
```js
30
-
// with ES6 import
31
-
importiofrom'socket.io-client';
32
-
33
-
constsocket=io();
34
-
```
35
-
36
-
A slim build (without [debug](https://github.com/visionmedia/debug)) is also available: `socket.io.slim.js`.
37
-
38
-
Socket.IO is compatible with [browserify](http://browserify.org/) and [webpack](https://webpack.js.org/) (see example [there](https://github.com/socketio/socket.io/tree/2.0.3/examples/webpack-build)).
39
-
40
-
### Node.JS (server-side usage)
41
-
42
-
Add `socket.io-client` to your `package.json` and then:
43
-
44
-
```js
45
-
var socket =require('socket.io-client')('http://localhost:3000');
46
-
socket.on('connect', function(){});
47
-
socket.on('event', function(data){});
48
-
socket.on('disconnect', function(){});
49
-
```
17
+
The source code of the website can be found [here](https://github.com/socketio/socket.io-website). Contributions are welcome!
50
18
51
19
## Debug / logging
52
20
@@ -56,11 +24,7 @@ In order to see all the client debug output, run the following command on the br
56
24
localStorage.debug = '*';
57
25
```
58
26
59
-
And then, filter by the scopes you're interested in. See also: https://socket.io/docs/logging-and-debugging/
60
-
61
-
## API
62
-
63
-
See [API](/docs/API.md)
27
+
And then, filter by the scopes you're interested in. See also: https://socket.io/docs/v3/logging-and-debugging/
0 commit comments