In this tutorial, we’ll be building a real-time chat application with NodeJS, Express, Socket.io, and MongoDB.

Here is a screenshot of what we’ll build:

Setup

I’ll assume that you already have NodeJS and NPM installed. You can install it from the Node JS website if you don’t have it installed already.

A basic Knowledge of Javascript is required.

Let’s get started.

Create a directory for the application, open the directory with your favourite editor such as Visual Studio Code. You can use any other editor, I’ll be using VS code in this tutorial:

mkdir chatApplication && cd chatApplication && code .

Next, let’s initialize the directory as a Nodejs application.

npm init

You’ll be prompted to fill in some information — that’s okay. The information will be used to set up your package.json file.

#nodejs #mongodb #socket.io

How to Build a Real-time Chat App with NodeJS, Socket.IO and MongoDB
7.00 GEEK