Skip to content

Commit 4922e39

Browse files
docs: points towards the website
The website is now much more stable, so there's no need to keep two copies of the same content (which must be manually kept in sync).
1 parent bcdd3be commit 4922e39

File tree

3 files changed

+5
-735
lines changed

3 files changed

+5
-735
lines changed

README.md

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,11 @@
1010

1111
[![Sauce Test Status](https://saucelabs.com/browser-matrix/socket.svg)](https://saucelabs.com/u/socket)
1212

13-
## How to use
13+
## Documentation
1414

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/).
1816

19-
```html
20-
<script src="/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-
import io from 'socket.io-client';
32-
33-
const socket = 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!
5018

5119
## Debug / logging
5220

@@ -56,11 +24,7 @@ In order to see all the client debug output, run the following command on the br
5624
localStorage.debug = '*';
5725
```
5826

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/
6428

6529
## License
6630

0 commit comments

Comments
 (0)