Fastify Course 🚀 The Performant Node.js Web Framework
Vložit
- čas přidán 27. 07. 2024
- This video will be a full introductory course to Fastify - a Node.js-based web framework/HTTP(s) server library. Fastify aims to provide the lowest overhead web framework based on Node.js. You can use Fastify to build a RESTful API, render templates like handlebars server-side (SSR), access databases with its excellent plugins. Fastify is plugin-based and extensible. It also supports hooks and decorators and its syntax is easy-to-learn and developer-friendly.
In the course, I introduce Fastify and its features, we talk about Fastify's advantages and disadvantages compared to other frameworks like Express, Koa and Hapi. Then we build a Fastify JSON API live and create a custom plugin which represents a controller. I demonstrate the JSON Schema validation mechanisms of Fastify. We then talk about Hooks and Decorators, which can be used to implement authentication with JWT, OAuth or any other authentication method and finally I demonstrate how to do database access with one of the DBA plugins - @fastify/mysql. Fastify also has plugins for MongoDB, Postgres, Redis and others.
Contents:
0:00 Intro - What is Fastify?
1:04 Why Fastify?
2:57 Build a Fastify Application
9:48 JSON Schema Validation
14:33 Create a Controller with a Custom Plugin
20:22 Hooks
21:17 Application Lifecycle
22:15 Decorators
25:14 Database Access Plugins
25:33 Using @fastify/mysql
35:43 Conclusion
Social Media:
Email: nikola.n.lazarov@outlook.com
Twitter: / nikelaz
LinkedIn: / nikola-lazarov
#fastify #nodejs #course - Věda a technologie
wonderful introduction to "fastify", nicely explained and understandable by any beginner. thank you for your presentation.
Glad it was helpful!
Thank you for the super helpful and concise video! I had a question about the use of `process.exit(1)` being used on your catch statement; I know it's a common practice I see on a lot of YT channels, but if you read the modal that pops up when you hover over process.exit(), Node actually states it's unnecessary to include it in most cases. This is because that the try-catch block inherently will handle the error and exit accordingly, but you also run the risk of prematurely terminating any asynchronous functionality when you execute process.exit.
Just curious to hear what your take on that is, as I'm confused as well, haha. It's a habit I do myself, that's for sure.
Very nice introduction. I’m enjoying learning about fastify. Your comments about the syntax are also useful.
Thank you! I'm really glad you find learning about fastify enjoyable!
Nice job dude! Tks a lot 🎉
Thanks!
This is a quick and simple tutorial to learn Fastify. Thanks, sir
Thanks! Glad you liked it!
@@nltech1 can we deploy fastify to EC2 instance easily?
I could not able to connect mySQL could please create a short tutorial?
Awesome!
Thanks!
Very good tutorial, thank you
Thank you! I’m glad you found it useful.
Really good content! Thnx
Thank you!
NestJS has passed Express in GitHub stars
Great video! I noticed you used a different syntax for database connection than most of the documentation I've seen. Usually it's the `connectionString` syntax. What is the difference?
Nice❤
Thank you! Glad you liked it.
good video..... without sound
What's the font you're using for VS Code? Awesome Content BTW ❤
Thank you! I use Cascadia Code: github.com/microsoft/cascadia-code
This is the worst ever framework when used with typescript. The developers have spoiled the documentation by including so many topic in a staggered way.
Do these two sentences correlate?
Its fine. Once ElysiaJS reaches 1.0 I’m rewriting