Home Travis CI
Comparison ExpressJs vs FastifyJs


Comparison Express and Fastify frameworks, consider the use case for each framework.


The both of them are great frameworks, summarizing the use cases for each one I would say that fastify:

  • Schema validation out of the box
  • This validation is a common factor in many APIs and this could help to provide a more homogeneus solution cross APIs
  • Claims to have a good performance in general, but I was not able to measure this point
  • Provides logging out of the box
  • Extensible using Hooks, but pay attention that this belongs to lifecycle and then any change in this regards could impact a product implementation
  • Extensible using Decorators, but pay attention to when and how to use them in each use case, in order to not have an impact in maintanability on the product
  • Extensible using Plugins, fastify claims to have a good community and source of plugins. This is a rich aspect.
  • Is developer friendly, because taking away common problems with configuration makes the develop to focus on solving particular needs of the business.

Express Js:

  • Very mature, first commit of this framework was in 2009
  • Huge community and middlewares that can help to solve common problems
  • Extensible using middlewares
  • In some use cases could have more work than fastify. I believe configs of fastify helps a lot here.
  • The same logs could be provided to Express as in fastifyJs
  • Very flexible and easy to use
  • So much flexibility can come with the need of extra effort to make things similar and homogeneus accross several APIs