Once Again started Nodejs:)
Hi! We are creating chat-app using framework like Nodejs and libraries like Socket.io and Express.Using Node.js we can write javascript for the server and Socket.io and Express can make use of websockets to push messages to user from server in real-time.
First step is to create directory structure
dependencies:
configure the static files folder
In index.html file add your html.....
Now in server.js create http server at port 8081
Now our task is to connect clients to server.
For this we use sockets
In client.js we add following code:
socket.emit('join','Hello server from client');
->});
In server.js add following code:
console.log('Client connected....');
client.on('join',function(data){
console.log(data);
});
->});
Uptill our app looks like

