How to Build a Video Chat Application with Node.js, and TypeScript

Shadid Haque
6 min readJun 30, 2019

Hey awesome people, it’s real good to see you back here. Alright so, in this tutorial we are going to be building a video chat application, yup you heard it right. We will explore how websites like Skype and Slack works. All right so let’s dive in.

Our Stack

  1. Node.js
  2. Express.js
  3. TypeScript

Why Node.js ?

That is an excellent question. Usually REST apis are written in a client/server model, in which the client would demand certain resources from the server, and get those resources in response. This architecture is common in traditional web applications. The server reacts when the client made a request, and then closed the connection right after each response. However, in 2009, Ryan Dahl introduced a new approach to server-side runtime written in JavaScript. It enables requesting in and out of the web server (I/O) to be processed concurrently and asynchronously using a concept called non-blocking, or asynchronous I/O. The original idea behind this was to build websites with real-time push capability. Thus Node.js was born.

Unlike the previous client/server model, it became possible to develop two-way connection websites with free data exchange. It’s mostly due to WebSockets, which allow opening an interactive communications session between a user’s browser and a server. Requests to a server are then processed as a loop (event loop, to be more precise), which makes Node.js a JavaScript runtime environment that takes a “non-blocking” approach to serving requests and thus, achieves low latency and high throughput along the way.

On another note a Node.js app is run in a single process, without creating a new thread for every request. Node.js handles concurrency through an event loop which makes it extremely scalable and able to serve millions of requests.

In a nutshell Node.js is built for real time scalable applications. I will provide links to further readings that will give you some further information on why Nodejs is ideal for real time applications.

Project Setup

Shadid Haque

Software Craftsman | Entrepreneur | Freelancer. Always on the look for opportunities to make the world a little bit better with technology.

Recommended from Medium