We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6afbb34 commit bddf652Copy full SHA for bddf652
Readme.md
@@ -21,6 +21,25 @@ var io = require('socket.io');
21
Next, attach it to a HTTP/HTTPS server. If you're using the fantastic `express`
22
web framework:
23
24
+#### Express 3.x
25
+
26
+```js
27
+var app = express()
28
+ , server = require('http').createServer(app)
29
+ , io = io.listen(server);
30
31
+server.listen(80);
32
33
+io.sockets.on('connection', function (socket) {
34
+ socket.emit('news', { hello: 'world' });
35
+ socket.on('my other event', function (data) {
36
+ console.log(data);
37
+ });
38
+});
39
+```
40
41
+#### Express 2.x
42
43
```js
44
var app = express.createServer()
45
, io = io.listen(app);
0 commit comments