Fastify is a Web Framework for Node.js that focuses on performance and developer experience. Fastify is similar to Express, Hapi and Restify, and is now ready for its v3.0.0 release, coming in July. The latest version is demonstrated in this video:
Fastify has a rich community and can be deeply customized without overhead. In the video, you’ll see fastify-autoload, which enables you to load a folder recursively! In Node 14 or 12.18, it also supports esm, allowing you to use
For this demo, we begin using a simple global server:
And we end up with a fully backed application with automatic loading of the routes folder:
And we can use the following to start our application:
I sincerely hope you like this video introduction to Fastify.
Fastify was first introduced at Node.js Interactive 2017 in Vancouver in the iconic talk "Take your HTTP server to Ludicrous Speed". The talk covers why Fastify is fast and how we achieved the results without compromising features. Some things have changed since then, but the core of the framework is still there!
If you enjoyed this video and if you would like help in bringing Fastify to production, reach out via our contact form. You can also find me on Twitter @matteocollina. You can also watch more of my demos in my Mastering Node.js Series.