0

Fastify is much faster than Express, achieving almost two times better benchmarks results. So how they’re achieving this while keeping express as core (nestjs)?

Jerry
  • 3
  • 2
  • Can you share what benchmark results you're looking at that show Nest having benchmarks at two times better than express? [Kamil posts the original benchmarks and explanations as to why express is faster here](https://stackoverflow.com/questions/47733390/nestjs-vs-plain-express-performance?rq=1) – Jay McDoniel Jun 21 '21 at 05:38

1 Answers1

0

From Performance (Fastify) in the NestJS docs:

"A fair question is why does Nest use Express as the default HTTP provider? The reason is that Express is widely-used, well-known, and has an enormous set of compatible middleware, which is available to Nest users out-of-the-box."

If you prefer high performance, you can follow that docs page to switch to the Fastify framework adapter.

mouche
  • 1,785
  • 1
  • 16
  • 22