Fastify Crash Course | Node.js Framework
HTML-код
- Опубликовано: 25 июл 2024
- Fastify is a "fast" Node.js framework. In this video, we will build a REST API with validation schemas and swagger documentation
Code:
github.com/bradtraversy/fasti...
Website & Docs:
www.fastify.io/
Article: Fastify vs. Express
/ express-vs-fastify-per...
Latest Udemy Courses:
traversymedia.com
💖 Support The Channel!
/ traversymedia
Timestamps:
0:00 - Intro
2:26 - Install & Setup
3:42 - Basic Server
5:30 - Create a Basic Route
6:33 - VSCode REST Client
7:50 - Data File
11:03 - Separate Routes File
13:30 - Options, Validation Schemas & Handlers
20:25 - Creating a Controller
22:37 - Fastify Swagger API Documentation
24:47 - Add Item POST
30:22 - Body Validation
31:59 - Remove Item DELETE
35:20 - Update Item PUT Наука
I would love to add on to this. If you followed along, take a look at the list of plugins - www.fastify.io/ecosystem/
and reply with what you would want to see implemented. Auth, mongo/postgres/redis, cors, etc
Maybe we could add a frontend as well
Please make videos on Auth Passport JWT and some other security related core plugins. Thank you!
Yes would love to see auth with backend action and frontend as well if it's not much to ask 👍👍👍👍
Well, if i can add one more idea. Adding an authentication layer using Single Sign-On(SSO) using Auth0 :) We could even have some roles
Would like to see Fastify with mecurius (GraphQL) or Fastify with mecurius & Prisma v2
Yes, if possible please add authentication with mongodb.
Would LOVE to see you take Fastify further - proper, secure auth, JWT, setting up Stripe, accepting payment/subscriptions, sending transactional email, and MongoDB.
😊
Thank you so much for this one Brad. I can't imagine how hard you work just to keep you audience ahead.
Web programming world, you're so fast and there's a lot to learn...
agree, but I only get to know what they offers not immediately use them.. unless org/company ask me to do or client want specifically want it then I will use them.. quite exhausted if you want to catch them all especially JS framework that keep expand.. since Fastify not so much different with Express i still can catch them up..
-A3n5N8XwpQ (youtube not allowed us to share a link here, so here is unique youtube id you can replace at the end of youtube url after watch equal sign) great advise from Ben Awad.. :)
Stop chasing/learning tools. Keeping up to date with every new framework or library is a waste of time.
Yup there is a ocean of js frameworks now days
Learn what you need and necessary. Dont learn it all. If you want a slow phase framework try .net or java. im pretty sure you will get stuck on editing bugs legacy apps for a long time lol
Finally, fastify gets some love, it deserves more popularity. My company uses it as standard nodejs framework, replacing express totally, for about one a half year.
How is your experience one year later. Just coming to the node ecosystem and Fastify seems really great and very similar to FastAPI which I love.
Great job, keep going, please do more with Fastify this is the 6th course that I took with you and now I am doing an internship as a node.js developer, I learned a lot from you man. I am looking to learn more from you. Thank you so much.
Thank you. I've been searching for fastify videos for quite sometime!
I saw an intro to Fastify from one of the creators, but this crash course really made me take a look at this framework and get started my new nodejs projects using it. Thank you so much.
Thank you Brad for this course. You're a life saver! Loads of respect for you man :)
Hi Brad. I would def want to see more on Fastify, you could always add on 1 or 2 apis to show case some more advanced features of Fastify.
Turn it into a speed guessing game if there is an api that generates random questions 🤪
If a front end were to be added, make it very basic as to concentrate on Fastify and maybe other packages you'd like to add that works well along side Fastify.
Data persistence you could write to the file system.
I just want to say that we all appreciate your hard work, millions of people will stand by my side when I say this, you made us into better programmers and better people
Looks really cool. I hope you will explore it further with a small MFRN? project... or even just a backend focusing on CRUD and what are the cooler features of Fastify.
I hope your health is improving. All the best to you and your kids. You're the best Brad!
Oh man, I have watched only the first two minutes of the video and I already know I'm gonna learn a ton!! I watched your last React video and now I found this one and I'm so f happy!
would love for part 2 where you implement a database. Thank You, this was a great tutorial!
what an amazing tutorial. thank you so much brad for your shared wisdom. fastify is really cool! the swagger documentation pluigin is mindblowing.
Thank you Brad, This was very helpful, looking forward to you doing Authentication and Data persistence with mysql. Also throw a few more light on Fastify decorators. Great work again!
Really nice tutorial, it will really help me getting started with fastify, please continue on this adding authentication and postgress or Mongo db
As always great tutorial Brad!
I'm watching this and thinking to myself- Nothing beats rails.
There are just way too much setup that I don't like.
Thank you so much for the tutorial Brad :) most awaited one. Can you please make video on postgre sql with fastify
I watch this as entertainment lol .. thanks Brad, high quality content as always
Hey Brad, thanks so much for making this awesome video. You made my day :) Also, it would be very cool to do a MERN stack course with justify . Thought it'll be really cool
Great tutorial. That HTTP extension is amazing.
i was looking at fastly. thanks again brad for this free tutorial
Great video as always from this channel, would love to see fastify with postgres and jwt auth ❤️
Awesome tutorial! Love more fastify tutorials, like building simple project with it..
Thanks for this awesome crash course. Auth and Databases such as Postgress would be great to see on your next video
Really enjoying your content, I will be waiting for lesson 2 and up. Thanks.
Excellent video! Thank you for putting things in such clear context...
Fastify is great! I like it a lot, actually planning on building my next project with Fastify on the backend
Bring on the full-stack! Mongo + Auth!! Great tut as always...
I have never seen anyone use the spread operator in any 'live' video tutorial. Watching that specific segment should assist anyone still not solid in its use (or use case) come away with a better understanding of it. Thank you!
I feel like it's a crime to watch this for free 😭. Thank you VERY much
Don't skip the ad.
hehe, you virgin boi, i watch his courses on udemy by downloading them using torrent.
Don't worry he gave patreon link in description
Thanks so much for the tutorial. I would like to see, as you suggested, adding a db to it, postgres would be great. Another idea for an expansion could be adding a frontend, using for example react-admin to manage these resources. I really liked your tutorial about react-admin as well. Thanks again, Brad
No problem and thanks for the suggestions
Been waiting for this since i saw your tweet
Thanks for making this useful tutorial. I really appreciate it. Please create one tutorial with redis and SQL database.
I think you forgot to add schema for update items to accept name from swagger.
One more crash course 😍😍😍 Thank you Brad❤❤❤ you are my greatest inspiration❤
Love Brad's videos. I am a bit late coming to this so there were some issues with using Swagger etc. with some updates since this was originally created. Not too difficult to make the necessary changes though. All in all a great resource. Thanks again.
Any hints of what you changed would be greatly appreciated. I can't seem to figure out what should be changed given the docs I've found. Thanks!
Awesome video as always. Thanks for putting so much efforts to make it simple to understand. Please create it a bit more complex and attach it with some DB and authentication.
I’d love to see a fastify tutorial using typescript! I’m trying to learn them together for a job right now along with sequelize and Postgres
Great tutorial As usual, thank you very much for making me love Fastify
this crash course is awesome. I learned a lot. Thanks!
I want to thank you for what you taught us till now.
No problem bud. Thanks for watching!
@@TraversyMedia can u tell me how u learn things so fast. I can't learn things. They took years. Plz Brad help people.
Excellent. please continue and create one or more additional Fastify videos.
Great job as always. This channel is truly a gem 💎
You explained very well how it works. Hello from Belarus :)
Thanks for sharing this awesome framework! Great tutorial 👌
Thank you Brad, would love to see auth, postgres and mongo
This is really helpful and nicely explained, thanks Brad. 👍
Please continue this series!!
Thank you for your well paced tutorial.
I think you've missed some of the schema options in order to have a fully functioning Swagger. When you have a parameter you must add something like:
params: {
type: 'object',
properties: {
id: {
type: 'string',
description: 'item id'
}
}
},
In the update option the body is also missing.
Regards.
Please do more fastify, i really do prefer it to express!
We need more videos on Fastify 😍
thank you a lot. your video helps me to understand about fastify. Please make videos on Auth Passport JWT and some other security related core plugins.
Huge Respect From A Small RUclipsr Sir 💖
Love Your Content 🖤
Hey man thanks again for your awesome tuts! got a small note though, using "Item" as model and route examples was a bad idea since I got confused it with the schema array items, not a big deal but confused me for few mins,
I got tired reading the docs, this worked great instead :) Thanks
A good alternative to REST client is Thunder Client. Every since i discovered this, i barely use PM unless am working in a large team with a lotta API endpoints. If am just testing an API to see the result, or post some data, i use Thunder client :)
I just haven't had time to look more into it. I will though. I hear great things
I like this, can you make it with typescript too for next video? I wonder the best project structure it would be for fastify when it comes with additional syntax
Great lesson as always Brad. Please do some auth with some database with Fastify. Thanks.
Loved this framework please make full fledge backend.
well you can use thunder client vscode extension for the requests. it's like you've integrated postman into vscode. ui and functionality is almost the same.
Hey Brad, thanks a lot. Didn't know this framework and seems promising.
I would really love to see Middleware implementation, and maybe some authentication/authorization.
Blessings from Argentina.
Fastify is amazing, it's decorator and plugin API is just underrated
Have you worked with fastify-autoload for route handling?.
Really enjoyed this! Perhaps a full stack PFRN (PostgreSQL Fastify React Node) full-stack app tutorial at some point?
Amazing video, bring more fastfy content please :)
Very clear and useful! Thanks a lot!
Wish that there will be nodejs+graphql crash course including authentication and pagination ya.
See maxmillian. He has a great video on that
@@mthaha2735 Really? Where can I check on his videos? Appreciate that
@@easyas-is udemy and academind yt channel
Ben Awad 14 hours YT course.
Hey Brad, could you create a video discussing the new VSCode update "Do you trust the authors..." prompt and the best/proper way to handle this?
Beautiful. I'm going to check if you did more on Fastify. Nevertheless, please keep working on Fastify lessons, this looks really promising. I also watched bechmark videos and indeed Fastify is what I need for the volume of data my apps handle. Express is just too slow for my use-case. Thanks.
I'm a simple guy. I see brad's video, I hit a like
Thank you very much, Master teacher of Web Development
More of Fastify 💙💙💙
I'm definitely down for a follow-up!
very clear course, thanks!!
I'd like to see mongodb used with this, and I wonder if I can use the same schema for both the handler and mongodb as to not have to change it twice in 2 different areas.
Looking forward for a more advanced and practical fastify course with database connection.
Pretty cool how I've read about fastify this morning and there's already a 1-month-old video on traversy media ...
I'd love to see how one could migrate some basic express app to fastify. not just the routing stuff, but also some (auth) middleware and knex model files. I'm pretty sure there's the one or another pitfall to stumble into.
What would be cool in general: A video on openapi / swagger. I have the feeling it's a generally trending topic and I think there's no video on your channel about it yet.
On a side note: Perhaps I didn't follow along properly, but this project's documentation does not accept path params for me. Can I define these in the opts as well? any help is appreciated
Hey Brad, love your channel, keep up the good work 👍. Can you do a video on Hasura Graphql server for postgres. Thank you. Takecare
Thanks, Brad. This was great.
It would be interesting to see how you can do authentication with this library
I would love to see the implementation of security with jwt using typescript 😀
It's look like very nice. I'm going to give it a try!
Nice tut as usual, cheers for it👍
Hey Brad! I was wondering if you're gonna do a Styled components crash course any time soon.
Just here to say I would love to watch the mongoose version you mention at 8:05
For those who want autocompletion.
const fastify = require('fastify').default;
const app = fastify({ logger: true });
app.* => You will get autocompletion now
Not all heroes wear caps! I kept reloading VSCode for a full minute. 😅
Yeah - fastify is great! Keep up the good work Brad!
Hi Brad, great job. Love from india🇮🇳
I'd love to see you take on something like storybook sometime 😃
The videos awesome simple to understand and learn
I would really like to see fullstack app with fastify using react with Authentication
Nice I love fastify! You should do a course/tutorial series on Kubernetes / Helm, maybe using keycloak as your authentication service?
thanks. I would like to see authentication with role (RBAC) example, if possible please
Thanks Brad for this one.
Would please make another video with fastify-mongodb based on routes, controllers, and mode?
hi brad, what software are you using to make this video? i realize the file size of this video are quite small
So, can we think about the fastify.register() method as an equivalent to app.use() method of Express, which we can use to provide middlewares?
Hey brad can you elaborate about express vs fastify which is better for micro service api
great vid! im gonna try using fastify
great content here!!.
please I would love it if you could do a video of authentication using a DB like mongoDB
thanks travy
i think it would be complete if you add jwt or redis session for auth, and any sql for db