🤢 Stop using express / koa and start using ...
When building absolutely any API, I need:
- An API schema with introspection capabilities (transforming the schema into language typing)
- A UI that demonstrates the API (e.g., swagger)
- Typing of the library's functionality (so that all requests and responses are correctly typed according to the schema)
- Middleware, logger, context for DI, plugins, etc.
Express and Koa are libraries with a minimal set of functionality, and you can add the above points using third-party libraries. Third-party libraries more or less cope with the 4th point, but with the first three, some problems always arise.
I don't want to bother adding functionality that I need for each project every time.
But there is a library that solves all these issues at once - Fastify
I decided to gather tricks on the above points in this article
Powerful, you, pump 💪