Find out which framework is the lightest out of the box with its dependencies
I wanted to develop a NodeJS microservice to be deployed on AWS Lambda (serverless) where size matters! Note that out-of-the-box, each framework has very different capabilities and helpers. The aim of this test is to find out what is the minimum size for each. The next step is to compare each framework with a specific use case.
For each framework, I created an empty directory with a package.json, added the framework, installed its dependencies and zipped it.
Framework | Version | Size (Unzipped) | Size (Zipped) |
---|---|---|---|
express | 4.17.1 | 2.4m | 684k |
fastify | 2.13.0 | 6.7m | 1.4m |
hapi | 19.1.1 | 2.0m | 424k |
koa | 2.11.0 | 1.6m | 352k |