Sign in

Passionate, Self-taught Full Stack MERN Web Developer that loves designing and building modern websites, applications, and APIs.

In this tutorial, we will be building a YouTube downloader with the backend implemented in Express and the frontend in React.

Youtube website
Photo by Szabo Viktor on Unsplash

The basic flow of the app:

  1. User will provide a YouTube video link
  2. The backend server will push this video link in the queue to process the download
  3. When the job is popped from the queue for processing, the backend emits the event for the client
  4. The client listens to the event and shows appropriate messages
  5. Users will able to download videos from a server

We will use for the emitting events and for processing and handling jobs…

In this article, we will take a look at accessing the Redis database directly from your client app.

Photo by Firos nv on Unsplash

In this article, we will implement an event booking application, which will include the following features:

  1. Creating an event in the database.
  2. Pushing events to the cache.
  3. Cache trending events, so we will run the CRON job for updating trending events in cache periodically.
  4. On the client-side React app, we will be fetching trending events directly from the Redis server using GraphQL, ie, no need to connect with the actual server.
1. POST => /api/events => Create events
2. GET…

Redis is an in-memory data structure used for cache. In this blog, we will implement a simple Node.js app that uses Serverless Redis, and also we will be using Upstash — Serverless
Database for Redis.

Photo by Clément Hélardot on Unsplash

What is Redis?

Redis is an open-source, in-memory data structure store, used as a NoSQL database for the cache to improve the overall response rate for most frequently requested data.

In this blog, we will develop Notes Taking App API, We will implement two feature,

  1. Take a note from the user.
  2. Return a note back to the user.

But here will use Redis, to cache note. If the user requests the same note frequently, we will return notes stored in Redis.

REST API Routes1. POST => /api/notes => Create notes
2. GET => /api/notes/:id => Get a note

Software Requirements

Let’s begin,

Part 1: Implementing A Backend Service

Let’s build a ToDo MERN app using GraphQL and Node.js, In this part, we will implement a backend service.

Photo by Elise Bouet on Unsplash


In this article, we will create a backend service with GraphQL i.e Apollo Server and MongoDB database.

We will be using the MongoDB database so make sure you install it locally or you can use free cloud service from MongoDB.

By creating this App, you will learn

  • How to design GraphQL schema.
  • How to design Queries and Mutations.
  • How to build a CRUD app using GraphQL API.

Initial Setup

Create a new project using npm

npm init -y

This command will set the…

The current version of Node.js added support for Top-Level Await just like Deno.js, and other languages like C#.

Photo by Sanni Sahil on Unsplash

Now, It’s now possible to use the await keyword outside of async functions.

Let’s take a look at an example.

We will fetch a quote from API.


Download and Install Node.js v14.3.0


Create Node.js project using :

npm init — yes

Now install the Axios library for fetching data from API.

npm install axios --save

Now modify apackage.json file.

Take a look here, we added type as module . Because the language has not fully implemented it yet stage 3.

Code goes like this,

Running this file using node --harmony-top-level-await top-level-async-await.js .


In this blog, we will create a thread for CPU extensive tasks that not blocking the main event loop.

Photo by Fabian Grohs on Unsplash

As we know, Node.js is a JavaScript runtime environment and runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser.

A Node.js app is run in a single process and JavaScript doesn’t support threading, then How we can do CPU extensive and long-running tasks without blocking the main event loop?

Is it really Node.js single-threaded?

Not really, Your JavaScript is not support threading but not Node.js, Node.js internally uses C++, recent addition of Node.js …

In this blog, we will learn to implement reverse proxy for NodeJS server

Photo by Pakata Goh on Unsplash

Proxy Server

Proxy is the server that sits in between a client and an actual server.

In this blog, we will learn to build COVID19 SMS Tracker using external API and Twilio.

programmer women
Photo by ThisisEngineering RAEng on Unsplash

Let’s get started,

Install the required packages

npm install --save express twilio axios

We will be using an external REST API to get COVID19 Cases.

First, get the latest COVID19 cases for India using Axios.

const covidINdata = await axios.get('');const latestData =;//API returns array which contains all snapshots of cases. We will use latest, means last element of array.
const data = latestData[latestData.length - 1];

Now configure, Twilio SMS API

Signup for Twilio, and get Account ID and API KEY.

In this tutorial, We will learn to protect REST APIs using JSON Web Token with an example.

Photo by Alexandru Acea on Unsplash

What is JSON Web Token aka JWT?

JSON Web Token (JWT) is way of authenticating user on internet. As name suggest it is JSON based taken. The token is signed using private secret key or public key. For example, a server could generate token which user login and provide to the client. This token could signed using user_id or email with secret key and expiration timestamp. This token payload used when client need to authenticate on server.

JWT is mostly useful for REST APIs, mobile apps, Single Page Web Apps…

OS module provides information related to the operating system and hardware.

Photo by Panos Sakalakis on Unsplash

The os module provides API for getting information about hardware related like CPU, memory, directories, IP address and many more.

In this tutorial, we will learn basics methods and some more concepts of os module.

To start working with the os module, we have to import osmodule in our project.

const os = require('os);


This method will return the architecture of the processor.

const os = require('os');console.log(os.arch());




This method returns an array of the object which contains information of logical CPUs.

const os = require('os);console.log(os.cpus());

Prathamesh More

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store