In this post, I will show you how to build a blog web API in Node.JS. This tutorial uses Express.JS for handling HTTP requests and Mongodb for storing data.

Table of Contents


Node.JS is a platform used for building server side applications using Javascript. With Node.JS, developers are able to build backend APIs in minutes. It has a great community and a huge set of packages. These packages help the developers for building great applications. Developers does not require to build everything from scratch. We mainly focus on two packages. First is…

React components can store a set of observable properties called states. React can decide how to render itself based on the state values. Sometimes it is important to share the state between multiple components by passing the state down through the component tree. When the component tree is too deep and the application becomes bigger, passing states using props through all these components creates a big mess.

Context aims to solve this issue. It stores all states in a central place and shares the states between the components without having to pass them down through the component tree. React Context…


In this post, I will try to explain React — Integration with third-party libraries.


React.js open-source javascript library for building front-end applications. According to [], it is the second most popular web framework after JQuery and the most wanted web framework in the industry.

There are many libraries that are written in plain Javascript or as a JQuery plugin, an example is Datatable.js. There is no need to reinvent the wheel, consume a lot of time and energy, and re-create those libraries.

When I started working on React.js last year, I faced a big problem. Integrating React.js with…

Express.js — JWT Authentication

In this post, I will show you how to integrate JWT authentication into Express.js applications using jsonwebtoken.


We need to secure user’s data from being changed or displayed without permission. There are many types of authentications. We usually secure web APIs using JWT authentication. This method suits best for web APIs. It does not require to store cookies on client or sessions on the server. It is a stateless way of authorizing resources. It is super easy to implement. It is very popular method for authenticating web APIs among the others.

There are many articles written about this topic. I…

Uploading Images Using Multer

Table of Contents


Today, we can find many apps and websites that upload images like photo sharing apps or blog websites. That is why, there are many good reasons to allow users store files on server. Http servers handle file uploading using POST requests. The case is different while talking about node.js. It is hard for node.js alone without using a library to handle uploading. That is the reason, there are many npm packages available. Multer is a good uploading npm package. It is mainly used with express.js.

Building web APIs is easy…

“Test-driven development (TDD) is a way of managing fear during programming” — Kent Beck


TDD which stands for test driven development is a way of building software applications. This approach adds extra complexity to the process. Developer has to write extra code — test cases. TDD makes sure that the piece of code is doing the required task before releasing. It makes sure the code can be changed easily as business requirement tends to change. The process consists of three main steps: Writing failing tests, writing code that satisfies tests and refactoring.

Before Start

  • The application code should meet certain standards then…

Bewar Salah

Software Developer

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