What is Middleware in Express JS? | Node.js Tutorials for Beginners

preview_player
Показать описание


(00:00) Intro
(00:05) Welcome
(00:15) Intro and Setup
(00:33) What is middleware?
(01:37) Applying built-in middleware
(07:03) Creating custom middleware
(14:49) Adding third party middleware
(23:00) Creating a custom error handler
(32:03) Improving the custom 404 route handler

📚 References:

✅ Follow Me:

Was this tutorial about middleware in Express JS helpful? If so, please share. Let me know your thoughts in the comments.

#express #middleware #beginners
Рекомендации по теме
Комментарии
Автор

Thank you for all your help! I appreciate you mentioning keyboard commands as well, that's fantastic info for a beginner!

Alibeee
Автор

This has been truly enlightening, this series has helped me tremendously with the aspects of node & expressjs I had been struggling with. I look forward to learning more from you in the future!

viciousinsights
Автор

Well explained Dave,
Middleware can be very handy to allow only authentic users to access certain pages,

I recently started using the Rest Client extension for VS Code instead of Postman, I found it easier to work with as I don't have to leave VS Code to test my API, it also let me have all my requests in a plain text file that can be included side by side with the app files.

Thanks Dave 🚀

ahmad-murery
Автор

Dave, you are my new hero. Thanks a lot for these videos, they had helped me a lot. Very very clear. Keep up the good job.

juangomez
Автор

Hi Dave, I just finished this module of the course and o far it is really excellent! I would only recommend that each module should start with an introductory slide explaining what will be developed in the module and perhaps a graph with the interaction of the different functions that will be implemented.

ampinkus
Автор

Hi Dave, you must be a very good teacher/mentor. I would love to work under/learn from someone like you!

You addressed a lot of pertinent questions, in a prudent sequence.

Plus your explanations are clear and concise. It lends a lot of motivation to why things are they way they are (these are the hardest thing to Google!).

Thank you so much for taking the time and effort to share your knowledge and wisdom!

wgllgw
Автор

great tutorial! Coming from the frontend world, it really helps me to undestand how the backend works!

pets_talk
Автор

Absolutely great video. Just for improvement purpose, it's best to import logger as a single value (const logger = require('./destination')) rather than as an object with named properties since that not how it was exported in the logEvents file. Even if, it doesn't matter anyways. Thanks for this very elaborate module, Dave.

ofofononoumoren
Автор

Very nice explanation. Step by step. Easy to follow. Thx

MrQVeeBoo
Автор

algorithm should recommend these videos to all the people who want to learn NodeJS.

loikvokhidov
Автор

Thanks Dave!! My websites coming along nicely!

NaviaryMusic
Автор

Super tutorial, progression is smooth and so interesting, thx !

cyberpaimpol
Автор

Apart from the great content, thanks a lot also for the source code, that slowly becomes a youtube standard, at least at most of the popular channels.

piotrekjazz
Автор

Very nice tutorial. Very easy to understand

soudaminipanda
Автор

6:02 Check this time stamp
And can you please elaborate that the path of css file you have assigned is different as we used to assign without middlware. I found it after searching alot that the path of middlware and the path of opening html file in a browser will be different.
I still don't know why it is so.
So kindly clear this out.. please please please please❤❤❤❤❤

saquibansari
Автор

Hey dave, at @34:51, I accidentally forgot the "else" in the if else block for req.accepts('json'). So it was if(req.accepts('html') followed by if(req.accepts('json'). When I tested with my browser, I got the JSON response. So it seems that my request accepted both html and json. However, I noticed that you said we needed postman to test the json functionality, which I agreed with until I hit my issue. Do you know why the above happened.

I also wanted to thank you for making such a fantastic and comprehensive tutorial on Node. I am currently using this to get out of my automated testing pigeonhole :)

Uniqlo
Автор

Quick question, what extension do you have that allows your file names in your Explorer tab to have different icons and colors?

moiraleon
Автор

This tut hasn't been liked enough.
I usually don't comment to thank, but thanks Dave

kkomax
Автор

A comprehensive tutorial on Middleware in Express, beautifully presented. Thanks, Dave

{2023-10-05}: implemented

Pareshbpatel
Автор

Can you please make a video node JS microservices crash course

DeepakGupta-hjdv