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).
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 npm? Can the versioning process be made smoother? And wouldn’t it be good to generate a changelog as well? And of course, before publishing the package, it would be great if tests are run just to be sure. …
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-
Registration: Middlewares are Registered against an event or globally. It means that whenever that event occurs, all middlewares registered against that event or are global are called in order in which they were…
What is brotli?
Brotli is an open-source, lossless compression algorithm that compresses content with higher density than gzip.
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.(https://www.opencpu.org/posts/brotli-benchmarks/)