Skip to content

Commit

Permalink
Trying out GH highlighting.
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jun 13, 2011
1 parent 94bc2bc commit 005f251
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var io = require('socket.io');
Next, attach it to a HTTP/HTTPS server. If you're using the fantastic `express`
web framework:

```html
```js
var app = express.createServer();
, io = io.listen(app);

Expand All @@ -36,13 +36,15 @@ io.sockets.on('connection', function (socket) {

Finally, load it from the client side code:

<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost');
socket.on('news', function () {
socket.emit('myOtherEvent', { my: 'data' });
});
</script>
```html
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost');
socket.on('news', function () {
socket.emit('myOtherEvent', { my: 'data' });
});
</script>
```

For more thorough examples, look at the `examples/` directory.

Expand Down

0 comments on commit 005f251

Please sign in to comment.