Creating the Node.js server

The first thing I will do is create a package.json file. We could manually create it, but I'll to open a command line into our projects folder and run npm init, and of course you have to have Node.js installed.

So, the name will be chatio, version will be 1.0.0, and description will be simple chat app. We'll change entry point to server.js. That's good and then put your own name so that should go ahead and create it:

I will add it to Sublime Text. Let's go to the C:\Projects\chatio. There's our package.json file. Now, we want to go in the code and add a couple dependencies. So, we'll say dependencies and add socket.io ...

Get Learn Node.js by Building 6 Projects. now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.