-
Create a folder
chat-app-backend
mkdir chat-app-backend cd chat-app-backend
-
Initialize
package.json
npm init -y
-
Install npm packages
npm install --save cors nodemon express socket.io
-
Add node script in
package.json
"scripts": { "start": "nodemon index.js" }
-
Run it on local (http://localhost:5000)
npm i && npm start