Skip to content

Instantly share code, notes, and snippets.

@politician
Created April 2, 2020 06:36
Show Gist options
  • Save politician/1e002f95b3225b10c816fe4a391e15b4 to your computer and use it in GitHub Desktop.
Save politician/1e002f95b3225b10c816fe4a391e15b4 to your computer and use it in GitHub Desktop.

Goal

Find out which framework is the lightest out of the box with its dependencies

Use Case

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.

Methodology

For each framework, I created an empty directory with a package.json, added the framework, installed its dependencies and zipped it.

Results

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment