What is Express middleware and how does it work? (in-depth)

Ғылым және технология

For resources and other information about this video, check out the corresponding post link below at Full Stack Foundations:
- Video Link: www.fullstackfoundations.com/...
-------------------------------------------------------------------------------------
Connect with me:
- Twitter: www.x.com/zg_dev
- Full Stack Foundations: www.fullstackfoundations.com
-------------------------------------------------------------------------------------
Timestamps:
0:00 Intro
2:53 The standard Express callback function
5:51 Writing your first Express middleware
10:00 Route middleware vs. global middleware
15:34 Working with several middlewares in a single app
17:59 Error handler middleware
24:56 Modifying the req and res objects using middleware

Пікірлер: 182

  • @mykalimba
    @mykalimba4 жыл бұрын

    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().

  • @Dev-tf2bx

    @Dev-tf2bx

    3 күн бұрын

    yeah .. learned that hard way ! (took me a week to figure out )

  • @MichaelMooregrownman
    @MichaelMooregrownman4 жыл бұрын

    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

  • @timovful

    @timovful

    4 жыл бұрын

    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

  • @slow_start
    @slow_start4 жыл бұрын

    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.

  • @josuerbague6851
    @josuerbague6851 Жыл бұрын

    One of the few tutorial makers who create understandable ones. You deserve more views.

  • @atee3938
    @atee39382 жыл бұрын

    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 KZread after watching all explanation on middleware

  • @sadhucat4476
    @sadhucat44764 жыл бұрын

    Such understandable explanations. I love that he fully explains how and why things work.

  • @hyakoissei466
    @hyakoissei4662 жыл бұрын

    This is the best resource for understanding Express middleware on the whole internet

  • @Moch117
    @Moch117 Жыл бұрын

    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!

  • @zachgoll

    @zachgoll

    Жыл бұрын

    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!!

  • @tayyabferozi
    @tayyabferozi Жыл бұрын

    The guy just gives concepts, rather than giving "how to do this" or "how to do that" tutorials.... Love from Pakistan

  • @thankyouthankyou1172
    @thankyouthankyou1172 Жыл бұрын

    I like your teaching very much! it is clear, calm. thank you so much, I've learnt a lot from you

  • @armaandhanji2112
    @armaandhanji21124 жыл бұрын

    Really appreciate the longer videos like these that really dig into the details. Thanks again so much! Subscribed.

  • @rizgamingvids
    @rizgamingvids4 жыл бұрын

    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.

  • @manishmadan5543
    @manishmadan5543 Жыл бұрын

    waiting for such detailed explanation from a long time, my quest is finally over !

  • @jjkelsey1180
    @jjkelsey11803 жыл бұрын

    I've watched several videos explaining express.js...and this video is the most clear and informative one for me. Thank you so much :D

  • @lukemuga434
    @lukemuga4343 жыл бұрын

    Wow!!! Now this is an in-depth guide to express middleware.

  • @nithishkumars1657
    @nithishkumars16572 жыл бұрын

    I dont know how u cleared my doubts that i have been confusing my myself with......but yaah...ur magic worked....hatsoff mann.....love from India ❤️

  • @abelgarrido2871
    @abelgarrido28714 жыл бұрын

    One of the more graceful explanations I've seen. Thank you!

  • @hiteshkayastha2490
    @hiteshkayastha24903 жыл бұрын

    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.

  • @haciendadad
    @haciendadad2 жыл бұрын

    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!

  • @mounirelbertouli9990
    @mounirelbertouli99903 жыл бұрын

    Yeeaaah finally i get a great explanation about Express middleware , no boring ! Thanks a lot Mr.Zach

  • @josphatoluoch5205
    @josphatoluoch52054 жыл бұрын

    I am at 12:17 but already liking it. Thank a lot Zach for the good explanations.

  • @helmialfathseptiana6383
    @helmialfathseptiana63833 жыл бұрын

    I wish u always keep sharing stuff like this, so fundamental, the series is gold ! thx

  • @CoryTheSimmons
    @CoryTheSimmons4 жыл бұрын

    This is a great series Zach. Thank you so much for the effort! It's really high quality and useful. =)

  • @thinksmartstudios
    @thinksmartstudios Жыл бұрын

    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

  • @justadev____7232
    @justadev____72323 жыл бұрын

    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!!!!

  • @kurtisivey7672
    @kurtisivey7672 Жыл бұрын

    This video is gold. Definitely came away knowing so much more about middleware. Thanks for explaining it so well.

  • @_theCodingChef
    @_theCodingChef2 жыл бұрын

    This is perfect! I subscribed immediately after the first 5 minutes of this video. He explained everything in detail. Thanks for this great video.

  • @amanaggarwal5884
    @amanaggarwal58842 жыл бұрын

    The explanations are very very good and to the point. Loved it

  • @flowerofash4439
    @flowerofash44392 жыл бұрын

    this tutorial is sooo goood detailed, easy to understand and generous

  • @johnnyboghean2242
    @johnnyboghean22422 жыл бұрын

    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.

  • @sreeni3037
    @sreeni30372 жыл бұрын

    Simply Superb Zach. Very clear explanation. Just Subscribed.

  • @mohammedfalih8713
    @mohammedfalih87133 жыл бұрын

    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 ❤🤟

  • @TakshvysDad
    @TakshvysDad3 жыл бұрын

    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.

  • @JohnCamden
    @JohnCamden4 жыл бұрын

    Very helpful. This whole series is great.

  • @libertad83y
    @libertad83y4 жыл бұрын

    Amazing! It should be the first thing to understand and master, congrats Zach!

  • @ytdevs
    @ytdevs2 жыл бұрын

    Yup, I'm in love lol thanks for series, it's a masterpiece. Appreciate you man

  • @sidarjunful
    @sidarjunful4 жыл бұрын

    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.

  • @ukasz6770
    @ukasz67703 жыл бұрын

    Wow! never thought I could understand this in one video. Definitely subscribing!

  • @yitzchaksviridyuk932
    @yitzchaksviridyuk9323 жыл бұрын

    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 KZread I've actually seen explain these things. Thanks again.

  • @zachgoll

    @zachgoll

    3 жыл бұрын

    You're very welcome!

  • @user-hs6tg6zy4e
    @user-hs6tg6zy4e3 ай бұрын

    The error handling part was amazing. Thanksss

  • @divaynagar1929
    @divaynagar19292 жыл бұрын

    Very concise and to the point video !!! Great one ...

  • @NimTaoWingChun
    @NimTaoWingChun2 жыл бұрын

    Absolutely brilliant. You are a great teacher, very clear and easy to understand. Keep it up.

  • @TakshvysDad
    @TakshvysDad3 жыл бұрын

    So much detailed explaining . Blessed to come across your tutorial. Great job. Please keep posting like this.

  • @kalaiselvan7352
    @kalaiselvan73523 жыл бұрын

    Simple as that. loved the explanation and going to watch remaining parts instead of a course which I actually bought. Thanks man.

  • @diegor5805
    @diegor58054 жыл бұрын

    I really needed this video. It clears up so many questions!

  • @huckbit
    @huckbit4 жыл бұрын

    Magic! Thank you very much for this video Zach !!! Your channel is awesome. Thank you for all your videos.

  • @nanda_8
    @nanda_83 жыл бұрын

    Loved this!!! Underrated video for sure

  • @donaldjr.labajo5687
    @donaldjr.labajo56873 жыл бұрын

    This sir, is by far the best explanation I have ever seen since I started learning programming. Thank you x3000!

  • @Hayden-ws7ru
    @Hayden-ws7ru Жыл бұрын

    Before this series I was dumb enough to not know, what I didn't know. Absolute legendary explanations, thank you very much!

  • @stephane777777
    @stephane77777711 ай бұрын

    Really good. This is what I was looking for. many thanks Zach

  • @yousufkhan2909
    @yousufkhan29093 жыл бұрын

    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.

  • @zachgoll

    @zachgoll

    3 жыл бұрын

    Glad it was the video that clicked :)

  • @deveshkumar2533
    @deveshkumar25332 жыл бұрын

    Zach..Brother....!! Under 10k subscribers for this channel, unbelievable . I just don't understand this world sometimes. You solve mysteries like none other!!

  • @zachgoll

    @zachgoll

    2 жыл бұрын

    Really appreciate it, we’re almost there though!!

  • @arkhamian7586
    @arkhamian75862 жыл бұрын

    One of the best explanations out there. Thank you for doing this!

  • @jamilkabir3168
    @jamilkabir31683 жыл бұрын

    You’re so good at explaining! Please keep making videos. Thanks!

  • @pratikdas9138
    @pratikdas91382 жыл бұрын

    you are best ,,, you have explained all basic in one video thanks

  • @bunnybloods768
    @bunnybloods7684 жыл бұрын

    This is the only video in youtube that you can easily understand what is middleware is

  • @amancode7013
    @amancode70133 жыл бұрын

    you got a talent for explaining, keep it up brodie

  • @antonyrichard369
    @antonyrichard3693 жыл бұрын

    Superb .. I know what is middleware earlier .. they are good as well .. but yours is deep .. loved it

  • @takshpatel8109
    @takshpatel81092 жыл бұрын

    Best Video on Middleware. Thank you so much for this video

  • @forexhoss9381
    @forexhoss9381 Жыл бұрын

    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 KZread 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.

  • @evilservo
    @evilservo3 жыл бұрын

    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

  • @boopfer387
    @boopfer38711 ай бұрын

    excellent one of the best if not the best! Thank you Zach!

  • @darkapopovich6331
    @darkapopovich63313 жыл бұрын

    This is super clear and useful, thank you!

  • @chidibede2417
    @chidibede24173 жыл бұрын

    Wowww, I have been working with middlewares without actually understanding it in such details...THANK YOU!!!!!!!!!! My Computer Professor I never had

  • @jacksonjk12345
    @jacksonjk12345 Жыл бұрын

    Excellent explanation. Very helpful❤

  • @aghahasaan
    @aghahasaan3 жыл бұрын

    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..

  • @danyalahmed641
    @danyalahmed6413 жыл бұрын

    This guy really deserve to be noticed by "so called" developer community on KZread

  • @joeygarcia7826
    @joeygarcia78262 жыл бұрын

    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.

  • @kchemutai3483
    @kchemutai3483 Жыл бұрын

    Thanks so much for this awesome explanation Zach. This helped me alot

  • @deepaktdk3637
    @deepaktdk36378 ай бұрын

    Great explanation.Much needed.

  • @johnyanastacio1107
    @johnyanastacio11074 жыл бұрын

    Thank you brother, this series is helping me so much...

  • @farlight6044
    @farlight60443 жыл бұрын

    Great video It's very clear and informative Thanks!

  • @imarpit007
    @imarpit0073 жыл бұрын

    Very nice tutorial. A lot of things to learn and this video will definitely help you.

  • @hercules3484
    @hercules34844 жыл бұрын

    Very much needed video. Thank you very much.

  • @ahmadza1836
    @ahmadza18364 жыл бұрын

    A very brain friendly explanation, keep up the good work

  • @kimjiyoung8655
    @kimjiyoung86552 жыл бұрын

    Zach! Super thanx from Denmark, it helps so much!! ;

  • @9gager87
    @9gager874 жыл бұрын

    Great video, thank you so much! Keep making these videos!

  • @kaan1780
    @kaan17803 жыл бұрын

    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...

  • @subhashgn1775
    @subhashgn17752 жыл бұрын

    Very well explained... Thank you and very grateful for this wonderfull resource.

  • @digvijayyamagekar7139
    @digvijayyamagekar71392 жыл бұрын

    Lord zach gollwitzer, thank you very much for this clear explanation, ✌️✌️

  • @lorocongarrote
    @lorocongarrote3 жыл бұрын

    unrated tutorials, no way this is a free course, thanks!

  • @michelbouchet3605
    @michelbouchet36054 жыл бұрын

    That's a very nice tutorial. Thank you!

  • @miraclesdohappen2352
    @miraclesdohappen23523 жыл бұрын

    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:-)

  • @kavin-nivak
    @kavin-nivak Жыл бұрын

    Thank you for making this bro❣️❣️

  • @gajanandsharma1113
    @gajanandsharma11134 жыл бұрын

    Nicest thing i have ever seen for express

  • @Dlntck
    @Dlntck3 жыл бұрын

    Wow, I've learned so much thanks to this video ! Thank you

  • @junaidrehman429
    @junaidrehman429 Жыл бұрын

    Great Video. I would be thrilled if you come up with a video of CRUD using MERN and clean architecture.

  • @monkeystylle
    @monkeystylle3 жыл бұрын

    thank you, this makes me understand express a lot better..

  • @esracigdem2714
    @esracigdem27143 жыл бұрын

    Nice explanation. Subscribed.

  • @sediqkhan8353
    @sediqkhan83534 жыл бұрын

    Awesome explainition. Thank you

  • @kidschannel2473
    @kidschannel24734 жыл бұрын

    This is nothing but best, who tf will even dislike this video?

  • @luunguyenphat9399
    @luunguyenphat93993 жыл бұрын

    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

  • @zachgoll

    @zachgoll

    3 жыл бұрын

    Awesome! Glad you got some value in them. Can totally understand the 1.5x speed; I do that on most KZread programming tutorials too 😁

  • @AbdulWahab-ev2ct
    @AbdulWahab-ev2ct3 жыл бұрын

    Awesome playlist 😎

  • @omgmaw
    @omgmaw2 жыл бұрын

    Great explanation!

  • @usmanfatal4030
    @usmanfatal4030 Жыл бұрын

    Love you for this man ❤❤

  • @sayonarasun1577
    @sayonarasun15774 жыл бұрын

    great explanation. thanks a lot mate!

  • @AgustinAstronomy
    @AgustinAstronomy2 жыл бұрын

    thanks for this video! i learned so much

  • @Blue-bb9ro
    @Blue-bb9ro2 жыл бұрын

    You're a great teacher

  • @broom7294
    @broom7294 Жыл бұрын

    this is actually soooo helpful frfr

  • @ecofriend93
    @ecofriend934 жыл бұрын

    This is great! Thanks a bunch!

Келесі