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.
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.
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? 🤔
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.
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)
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 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.
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?
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
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
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
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.