Learn Just Enough Fastify to be Productive
Vložit
- čas přidán 28. 07. 2024
- Repository: github.com/TomDoesTech/just-e...
0:00 Intro
1:46 The basics
4:17 Graceful shutdowns
8:41 Plugins
13:13 Decorators
19:18 Lifecycle hooks
22:27 Validation
25:51 Bonus
29:24 Outro
🌎 Follow me here:
Discord: / discord
Twitter: / tomdoes_tech
Facebook: / tomdoestech
Instagram: / tomdoestech
TikTok: / tomdoes_tech
☕ Buy me a coffee: www.buymeacoffee.com/tomn - Zábava
Man I love your approach, like you allow things to stumble and get messed up before fixing it... That is SO much better than just giving the right answer.
Great video. I got to learn so much from this short tutorial. Could you please make a video on steps a beginner like me to should follow to get a grasp on backend development using fastify.
I am convinced to use Fastify in general👌
Thank you! That was the most succinct and on point Fastify tutorial I could find on the web. Now I need to find one explaining canonical architecture and folder structure used in professional settings.
I have a shorts video about the file structure I use
@@TomDoesTech Thanks, found it: "How I structure my backend (czcams.com/users/shorts5n_xq-iwnrY)"
@@case6339Do you have a github repo link maybe to look at the folder structure more closely?
The course is awesome thanks 🎉
Great tutorial. Going to start my next application with it.
It would be very interesting to see the swagger setup for fastify
A lot of articles that I have seen seem obvious and optimal to me (a lot of boiler plate)
you are amazing, keep going
You’re the only person that kept it simple and didn’t use the million and one ways to do this! Thank you a million! People over complicate things waaay to much and i just want to fetch some data and be done with it. I’m not trying to get to fancy and if i am ill use dotnet or axum or anything else. One thing i’ve been searching in the js/ts ecosystem is a folder structure where you extract the callback handlers and not just extract the fastify.get etcs (crud stuff) but with named functions like a normal person. 😂 The messy single file stuff makes my adhd act up 🤪 so a video on a folder structure would be greatly appreciated. Have of what you did i figured out just me saying around because the docs weren’t helpful. Not because everything isn’t there but to me it’s how you present especially the typescript code. This video would be great to update fastify’s typescript docs. They have a schema typing thingy but i just want the basic how to in typescript and this would be a solid contribution to the docs! Awesome video and thank you! following and liking 💪🏾. Oh Drizzle ORM fastify maybe next? 🤔
Thank you, could you make a video tutorial for trpc and fastify ?
Thank you for making this. It was really informative. Btw, what is the name of your vscode theme
Hi Tom, is there a way to somehow connect Next-Auth with standalone Express/Fastify server that will be receiving session object with middleware? I do know T3 stack is awesome, but if an application is about to grow, then maybe having separate backend would be a better solution?
Have you thought about making a fastify microservice video? Would love to see that
Nah, in my mind they don't really have anything to do with each other. Microservices is an architecture and what an API in that architecture is build with is kinda irrelevant. If you know how to build a service with Fastify and you know how to build a microservice arch, you can build microservices with Fastify
I tried the TS version. It frankly seemed a big headache.. I ll reconsider that I think it's going smooth for you
Hey Tom, have you ever used Nestjs and have any thoughts on it? Been playing around with it and it's pretty tightly coupled with Fastify.
Yeah I do use Nest but honestly I wouldn't start a new project with it. It's just a lot of boilerplate and I don't think the advantages that it comes with are worth it for me
what's your vs code theme
I don’t know how you’re able to jump from one technology to the next. I am still learning T3, let alone still getting experience with React/Typescript/JavaScript /random packages in general. Difficult to move on to something else without forgetting the last thing I’ve been trying to learn. Are you knowledgeable in creating recursive functions? Namely for typing, mapping, (& possibly validating via zod) recursive Prisma models.
Experience helps learn new things relating to what you already know. So, if you know JavaScript and express, as well as about REST and api design, then fastify is easy because you know what an api is, what they do etc. you’d just learn how the framework does it.
It’s hard to make that switch in mentality - I even struggle with it. But, if you think of it as a different tool for doing the same thing you already know, then it’s easier
Can you build a large scale application with trpc ?? Like multi tenant application, complex data query form rpc to another rpc, execution context. And also what are the limitations than using normal rest and graphql.
I could but I don't really like making videos that cover so many topics. Is there anything specific that you want to know?
@@TomDoesTech any chance of covering how to deploy the T3 stack (which features TRPC) on AWS rather than vercel? E.g. using lambdas for TRPC
i wish there was someone to help me build a couchdb plugin
How are you installing these packages? I'm so confused.
What do you mean? Use a package manager like yarn or npm
@@TomDoesTech means you didn't used any commands on the screen
Hey Tom, do you feel that fastify is really much faster than express ? or it should not be consider the best part of fastfy at all ... and maybe all ecosystem and TS suport is the real deal ?
I'm not sure about speed to be honest and I don't really care that much. The real selling point for me is the hooks, decorators, ecosystem and overall code quality
@@TomDoesTech Nice, tks bro
Hi Tom, what vscode theme are you using?
Hi @fnx, did you find the theme?
@@sbcar824 it's bearded theme monokai black
how can we move/migrate hapi plugins to fastify plugin
Refactor your code? I don't know
does it have , all express package support and is it better than nest js ??
What do you mean by npm package support? It women stop you from installing NPM packages. Sorry not sure how to answer that question. You can't compare it to Nest, you can use Fastify with Nest but I don't like Nest.
@@TomDoesTech I mean all express packages ! Does it have compatibility with all express packages or !?
@@Muhammed-nani964 No, you can't use express packages. Fastify has it's own ecosystem
What theme are you using?
I am creaming for more Fastify content
I get it
I read this comment to my wife, she laughed :)
@@TomDoesTech At least I've made one woman laugh this valentines day 😂 my partner... not so much
i can't make the vies plugin works i am gettin reply.view is not a function
Did you register it before you tried to use it?
Hi Tom there's a typo in the title
Of course there is :facepalm, thank you!
Better then Express. But still not simple and good (in general) as FastAPI
In the end I personally prefer Python over TypeScript for build Backend APIs