Setting up the Node.js server

We need to initialize our root directory for the node. Execute npm init and it will create package.jsonNow our login page is created. To run it, we need to set up the Node.js server. We want to create the server in such a way that by executing npm start, it should start the server. 

To achieve it, our package.json file should look like the following piece of code:

    {       "name": "kotlin_node_chat_app",       "version": "1.0.0",       "description": "",       "main": "backend/server/app.js",       "scripts": {         "start": "node backend/server/app.js"        },      "author": "Hardik Trivedi",      "license": "ISC",      "dependencies": {         "ejs": "^2.5.7",         "express": "^4.16.2",         "kotlin": "^1.1.60",         "socket.io": "^2.0.4"       }     }

We have specified a few dependencies here ...

Get Kotlin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.