Axios Tutorial: Get/Post/Put/Delete request example

Axios is a promise-based HTTP Client Javascript library for Node.js and Browser. In this tutorial, we will create examples that use Axios to make Get/Post/Put/Delete request. The final section shows a simple Axios HTTP Client to interact with Rest API.

Related Posts:
Axios Interceptors tutorial with Refresh Token example
Javascript Fetch API tutorial: Get/Post/Put/Delete example

Read More

Simple Factory Pattern in Node.js

In this tutorial, I will so you how to implement Simple Factory Pattern in Node.js.

Instead of using class constructors or new keyword to create an object of a class, we can abstract this process. So, we can determine the type of object at run-time, by the time of generating that class object. The implementation seems like Factory Method, but simpler than Factory Method. This simple Factory is not treated as a standard GoF design pattern, but the approach is common to any place where we want to separate the code that varies a lot from the code that does not vary.

Read More