Skip to content

Commit

Permalink
docs: add server port in the example (#1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
mipra282 committed Sep 29, 2020
1 parent f4a4d89 commit 6ce02ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serve the file `socket.io.js` found in the `dist` folder or include it via [CDN]
```html
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io('http://localhost');
var socket = io();
socket.on('connect', function(){});
socket.on('event', function(data){});
socket.on('disconnect', function(){});
Expand All @@ -30,7 +30,7 @@ serve the file `socket.io.js` found in the `dist` folder or include it via [CDN]
// with ES6 import
import io from 'socket.io-client';

const socket = io('http://localhost');
const socket = io();
```

A slim build (without `JSON3`, a JSON polyfill for IE6/IE7, and `debug`) is also available: `socket.io.slim.js`.
Expand All @@ -42,7 +42,7 @@ Socket.IO is compatible with [browserify](http://browserify.org/) and [webpack](
Add `socket.io-client` to your `package.json` and then:

```js
var socket = require('socket.io-client')('http://localhost');
var socket = require('socket.io-client')('http://localhost:3000');
socket.on('connect', function(){});
socket.on('event', function(data){});
socket.on('disconnect', function(){});
Expand Down

0 comments on commit 6ce02ee

Please sign in to comment.