Simple Chat App; socket.io

Hi guys, this would be a 🤞simple tutorial to create a 🤞simple chat app. You know, an application where you can type a message and it pops up on some other computer, yes that one. Well we will try to make it as simple as we can. I’m assuming that you are aware of NodeJS and you have used it before. Well because we would be using NodeJS and a library called socket.io for our endeavor. So let’s get started …

Express Middleware

A middleware is just like a function and generally takes 3 parameters. These are loaded with code that could manipulate the parameters that are passed. The parameter used in any middleware is the request object,  the response object, and the next function or middleware which are more commonly denoted as req, res, and next respectively.  Generally, middleware is used when we would want to perform some operation before sending the data back to the client. Now let’s set up our …