Great video! You may be one of the few that totally explains Express middleware. Also I agree that understanding middleware will help make you a better Express Developer. I feel like a better Express Dev already
sure , because express itself build on 2 concepts first is middleware function second is callback functions . if you comfortable with these concepts so you good to go
Note to everyone watching: if you ever see your browser spin-waiting as seen in some points in this video, that's usually an indication that the app isn't completing a path through your middleware or route handlers. Sometimes it's a missing call to next(), like shown here. Sometimes there's a code path through a route handler that doesn't call a res.end(), res.json(), or res.whatever().
Zach! Brotha! You have single-handedly demystified everything surrounding Express and Passport for me. Something literally every major js tutorial youtuber has failed to do. So glad I found you man, thanks again. Subbed.
I have been trying to understand middleware concept ,watched several tutorial ,this explains everything perfectly and all my doubt cleared.its the best explanation on RU-vid after watching all explanation on middleware
Thank you very much for helping to understand the middlewares in express. I have been confusing in understanding the middlewares since last a couple of months and today you helped me to understand this concept very well. Thank you again.
Bro I've watched so many videos on Express middleware and NONE of them covers the concepts like you do. They are all just spitting out code without explaining WHY things work the way they do. I found the error handling and next() explanations extremely helpful. Thank you!
Nice, that’s definitely the goal of this channel. I want to show 1) why something works and 2) how I figured it out. Glad to hear you’re getting that out of it!!
After reading/watching from multiple sources, finally someone who teaches this concept in a way that I get it!!!! Thanks Zach!!! Your teaching abilities are amazing!!! Props!!!!
it was an wonderful explanation. I've been struggling all day today to understand this, you made it so simple. I could finally connect al lthe dots.Thankyou so much
Thank you very much for the time and effort you invest into making these videos. They are high quality, and you're the first developer on RU-vid I've actually seen explain these things. Thanks again.
Wow excellent explanation of the topic. I have been scratching my head since last week. searching all over the internet to find a simple explanation of node. express and server, but explanations over the internet are filled with jargons that only experienced developers can understand. Keep sharing such type of excellent content, it means a lot for people like me. Liked and Subscribed.
Zach..Brother....!! Under 10k subscribers for this channel, unbelievable . I just don't understand this world sometimes. You solve mysteries like none other!!
This is the best video I ever watched. despite watching so many videos I lost my head on learning middleware but you have cleared all my doubts. I am your permanent sub now.
You're doing a very good job. I have skimmed through your videos in this video's playlist, at first, I supposed that I already knew it, but your explanation makes me clearer understood. However, I have to increase the video play speed to 1.5x. Last word, thanks! :D
Great job! The one thing that I still haven't seen demonstrated in any of these Express middleware videos is content negotiation, something that can return an error too, such as a 406 or a 415.
man you are a phenomenal after tons of videos I've watched you explain the topic in 30 minutes and add on them the whole express framework keep up your great work. wish to you all the best ❤🤟
Bro! I am very thankful for this video, not just because such a video is available because of you, but also the time you took to explain everything seamlessly.
Really great video! I have been using middleware already but after just simply watching this video I feel like I truly have an understanding of how they work.
Damn thank you so much man. I just recently started learning about the backend of things, specifically I just started with Express.js and man, this definitely is a bit more difficult than I anticipated. The middleware concept had me initially so confused. But I just finished this entire video and saw your RU-vid Header Image, I definitely must say, after watching this video, this hard concept has FINALLY clicked 😄 Thank you so much man! Overall I think you delivered this extremely well. The general pace and simple examples with thorough explanations really add value.
WOW, Thank you Zach! I love seeing the new group of instructors, they are really good! I am a new subscriber now, I hope more people discover your channel! The only feedback I have, is I think your volume should be a little higher. I heard it fine, but I had to put up the volume to its highest level on the video itself and my laptop and it was perfect, but I was in a quiet room, other than that it was great. I am going to checkout the Passport videos next!
Fantastic explanation! Now I have a much better understanding when it comes to what happens when I app.use() libraries like bodyParser, Helmet, Cors and so on...
Awesome job, finally someone taught me the REAL basic to build my castle of express upon, THANKS A LOT, no mattter how much I thank you it will never be enough
Thank you so much, I was so confused until today that I switched to long polling for my chat app just cause I didn't really get the real flowcharts although my socket io application is working just fine.. this is the best tutorial on this topic and explains everything that is required, others use too many middlewares or middlewares along with templating engines and other cool technologies..
Myself using Node JS and Express pretty extensively but your video given a great insight specially on express middlewares, for sure this will help me to optimize my code..great work dude cheers and gud luck with your future videos once again great stuff:-)
So much detailed explanation . Blessed to come across your tutorial. Great job. Please keep posting like this. You are going to take over the express tutorial.
Something that's really important, and that you didn't mention in this tutorial, is that next() is like a recursive function call, in that it also `unwraps` (unless a later middleware `return`s before it gets a chance to)... What I mean by that is, any code you have that's placed AFTER the next() statement will be run once the last middleware has been reached. Pseudo code example: middleware1 log(1) next() log(2) middleware2 log(3) Would result in: 1 3 2 Being logged.
Yep that’s a great one! Definitely have to be careful with that, I generally throw a return statement before calling next() if there’s code that comes after it that I don’t want to run
This was excellent, a very clear and understandable explanation. I'm in my 2nd year of a degree with 2/3 computer science classes. One of the classes I've been studying since October has had me writing and extending a couple (a bookshop which we extended fortnightly for 6 months and a nutritional app/recipe builder) of Node/Express apps which serve ejs templates and also serve as APIs for database operations (experimented with MongoDB & mySQL on different assignments). I've got good scores all year but haven't properly understood middleware until now.
@@zachgoll I came across your channel tying to figure out session management for another university project. I have a Vue app hosted on Heroku (served by an Express instance) and it uses an Express API I wrote for db (MySQL) operations, which is CORS configured to accept HTTP requests from the Vue app and is hosted on a virtual machine on my university departmental server. Hopefully I'll slowly figure it out from your Passport authentication series. These videos are great, thanks for the time you've clearly put into creating them
In addition, I'd also keep an eye on my #fullstackroadmap series. I will be covering these topics over the next couple of weeks through building an E-Commerce app. Here's the playlist - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZZJT5uskuvI.html
@@zachgoll Thanks, I expect I'll check those out at some point in future. Just had a quick look at what's in the playlist and by the time you get to session management, it might be too late for my purposes. But I reckon i'll figure it out from your Node/Passport auth series