Update socket.io guide to include server.listen()
parent
c6e197d940
commit
64598cf20a
11
README.md
11
README.md
|
@ -774,7 +774,16 @@ io.sockets.on('connection', function(socket) {
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
We are done with the server-side business.
|
One last thing left to change:
|
||||||
|
```js
|
||||||
|
app.listen(app.get('port'), function() {
|
||||||
|
```
|
||||||
|
to
|
||||||
|
```js
|
||||||
|
server.listen(app.get('port'), function() {
|
||||||
|
```
|
||||||
|
|
||||||
|
At this point we are done with the back-end.
|
||||||
|
|
||||||
You now have a choice - to include your JavaScript code in Jade templates or have all your client-side
|
You now have a choice - to include your JavaScript code in Jade templates or have all your client-side
|
||||||
JavaScript in a separate file - in `main.js`. I will admit, when I first started out with Node.js and JavaScript in general,
|
JavaScript in a separate file - in `main.js`. I will admit, when I first started out with Node.js and JavaScript in general,
|
||||||
|
|
Loading…
Reference in New Issue