Currently, the npm registry has the most number of packages/modules in comparison to any other package registry for other languages(Source). It is also the most growing registry with more than 500 new packages per day(and that’s just public packages).

From, comparison of the number of packages per month for different languages

So how can one contribute to this growing list of packages? It’s pretty easy actually…just develop something and run npm publish. Oh, wait…there was some error regarding authentication. Well just run npm login enter your credentials and run the command again. It will succeed(most probably).

But is it the right way to do it? How can one manage the credentials of…

In this article, I will try and explain the implementation of middleware pattern in JavaScript. A middleware is something which sits in between the functions and has access to some arguments related to the previous middleware. They are generally useful for logging, modifying the arguments, error handling.


You have probably used a middleware if have used Express or Redux. They immensely help us in structuring the application into more reusable functions.

Here I will explain the working of how express handles the middleware approach. It is more of a stateful approach. There are 2 phases in this middleware approach-


Photo by Markus Spiske on Unsplash

What is brotli?

Brotli is an open-source, lossless compression algorithm that compresses content with higher density than gzip.

Why brotli?

According to the compression benchmarks, brotli provides better compression(around 15% improvement over gzip). This means that all the static assets sizes would be reduced by 15% if we serve brotli compressed files to our users.(


JavaScript Dev @MindTickle

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