Strategy Pattern in Node.js: A Practical Approach

Strategy Pattern in Node.js: A Practical Approach

In this post, I will explain how to implement the Strategy Design Pattern in Node.js. To illustrate this concept, I’ll use the example of integrating multiple payment methods which can be used in the e-commerse and other applications to accept payment from customers. Whether it’s PayPal, bank transfers, or credit card. Strategy Pattern The Strategy Design Pattern is a behavioral design pattern in software engineering that enables the dynamic selection of algorithms at runtime, allowing for greater flexibility and adaptability in the application’s behavior....

November 14, 2024 · 7 min · 1370 words · Prakash Bhandari
Gatling API Load Test With JavaScript

Gatling API Load Test With JavaScript

Ensuring an application runs smoothly in production is crucial. This post guides you to write and execute a simple Gatling API load test using JavaScript to ensure the stability, speed, scalability, and responsiveness of your application under a given workload. You may have written unit tests and functional tests, and the application looked good, so you shipped it to production. However, it suddenly crashes, experiences performance issues, or encounters API request timeout errors....

June 14, 2024 · 11 min · 2296 words · Prakash Bhandari
Implementing Logging Using Node.Js, Elasticsearch, Kibana and Docker

Implementing Logging Using Node.Js, Elasticsearch, Kibana and Docker

Logging play a very important role in software development. It helps monitoring, troubleshooting, debugging, event tracing, request tracing, security, and also can be used by Business Intelligence(BI) for reporting purpose. Logging has numerous benefits. But in this blog post, we will focus on building a real-world example to store application logs in Elasticsearch via a Node.js app by using the Winston NPM package and visualize them using Kibana. Additionally, we will dockerize the entire application....

June 10, 2024 · 9 min · 1755 words · Prakash Bhandari
How to Dockerize a React Application?

How to Dockerize a React Application?

Dockerizing is the process of packing, deploying, and running applications using Docker containers. Docker is very popular among the developers. In this post, I am going to show you “How to Dockerizing the React Application?”. for local development and ready for production with great performance. Before that I will briefly define what is docker and react. What Is Docker? Docker is an open source tool that combines your application with all the necessary dependencies and libraries as one portable package (docker image)....

January 5, 2023 · 6 min · 1103 words · Prakash Bhandari
How to Publish Your Own Public NPM Package

How to Publish Your Own Public NPM Package?

Publishing your own public NPM package is not that hard. All you need is basic understanding of Javascript, NPM, package.json file and Account in https://www.npmjs.com In this post, I will try to explain the steps to create and publish your own public NPM package to https://www.npmjs.com. To demonstrate, I will create real NPM package which will convert English number to Nepali Number and Nepali number to English Number. Finally, this package will be publish to https://www....

December 1, 2022 · 8 min · 1624 words · Prakash Bhandari