ExpressJS Routes Tutorial - Separating Routes into Different Files

  Рет қаралды 105,597

PedroTech

PedroTech

3 жыл бұрын

In this video I will teach you guys how to separate your ExpressJS / NodeJS api into separate routes in different files. This video was requested by a subscriber, so I decided to talk about it!
-
🚀 Learn ReactJS By Building 6 Projects: codedamn.com/learn/reactjs-pr...
Please leave a comment on what topic you guys want me to cover next!
-
📞 Tutoring Session: www.fiverr.com/share/pw8RPY
💻 PedroTech Discord: / discord
-
Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Website: machadopedro.com
Twitter: / pedrotech_
Linkedin: / machadop1407
Instagram: / _pedro.machado_
Github: github.com/machadop1407
Email: machadop1407@gmail.com
Tags:
- ExpressJS / NodeJS
- Routes / Router / app.Router()
- ReactJS Tutorial
- ReactJS and MySQL
- NodeJS Tutorial
- API Tutorial

Пікірлер: 139
@yazeezy4425
@yazeezy4425 Жыл бұрын
Pedro is a man of culture with that PORT number ;)
@bilalrasheed8272
@bilalrasheed8272 Жыл бұрын
🤣🤣
@Humperpump
@Humperpump Жыл бұрын
nice
@jtaylor8606
@jtaylor8606 Жыл бұрын
Once again one of Pedro's video's has just helped me understand an issue that has been driving me nuts for about 2 days. Just such a good youtube channel.
@chyejoo
@chyejoo 3 жыл бұрын
I am a Student for Fintech for non tech professionals. Been overwhelmed with the crash course workload, and not getting anywhere. Your videos helps me to understand the loads of codings thrown on us. Although I had difficulty following your videos as you speak pretty quick, but mostly due to my lack of knowledge. I am learning daily, and your channel has many lessons i need to learn for my course. Especially your new fullstack series. I am just starting with video 2. Took me 2-3 days to get all the dependencies and mySQL to work as in your video. Look forward to completing your fullstack series. You have individual videos targeted to this series, like the sequelize, Express etc, which helps me understand the whole process better. Hope you will have more videos targeted to Fintech and basic Blockchain technologies. Thanks very much and look forward to learn more from you!!
@STUPIDYOUTUBE_AI
@STUPIDYOUTUBE_AI 2 жыл бұрын
The way you taught this modular approach is so much clearer because it's funny that i've watched 3 videos on express routing before I've seen yours, and the previous 3 videos didn't go as detailed as what you did here, which is very helpful for my understanding. Call me dumb, but I only learn from videos that actually makes sense, and your channel has done a lot of good for me, cheers Pedro! The simple tutorials broken down into detailed explanation will help someone out there and thank you for it! (like me!)
@hxauax
@hxauax Жыл бұрын
The best explanation I've found on routes and exports, thank you
@jasonxb2998
@jasonxb2998 Жыл бұрын
Excellent tutorial! Really helped me grasp this content without bloating the example with unrelated code
@GeorgesMayrink
@GeorgesMayrink 2 жыл бұрын
Hi, Pedro. Thanks for the direct simple explanation on how to better organize the files. I certainly have one or two projects that will benefit from it. 😅
@skl949
@skl949 2 жыл бұрын
bro your channel is too good! please continue being this awesome!!
@neilranada
@neilranada Жыл бұрын
This is an excellent explanation of express routes!
@ThColinPereira
@ThColinPereira 3 жыл бұрын
This is a really nice video! Thanks, Pedro!
@richard1991ish
@richard1991ish 5 ай бұрын
Excellent video. Exactly what I needed, the foundation of express router! Well done 👍
@shibinraja
@shibinraja 3 жыл бұрын
I was also confused how to create separate routes for each REST API. Now , i got a clear idea how to achieve that and make the filer readable without so much of cluster. Thanks Bro. Hereafter , i will watch your entire video on node to understand it well.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad it helped! I will make a full introduction to node/express video soon!
@PixelCowboy
@PixelCowboy Жыл бұрын
I love direct, simple and very understandable Explanation like this
@anangyoga1381
@anangyoga1381 3 жыл бұрын
thank you sir! it's simple, clear, and easy-to-understand for me.
@dollboy4113
@dollboy4113 3 жыл бұрын
ExOeactly what I was looking for, thanks a bunch!
@AAfzal-lk2nf
@AAfzal-lk2nf 3 ай бұрын
Simple, on point and amazing tutorial👍🏻
@rhenanfreire9143
@rhenanfreire9143 2 жыл бұрын
Top stuff, thanks Pedrão!
@praffsphr1136
@praffsphr1136 2 жыл бұрын
Very useful video, thanks Perdo!
@haritmakwana6296
@haritmakwana6296 2 жыл бұрын
this is a very simple and nice video than other videos, thanks buddy
@negros111
@negros111 8 ай бұрын
You are so perfect teacher, maybe the best on yt!
@Raj10185
@Raj10185 5 ай бұрын
Explain the concept beautifully thanks
@elfrompo6771
@elfrompo6771 Жыл бұрын
Fantastic tutorial. Subscribed!
@k303k
@k303k Жыл бұрын
Thanks a lot for this tutorial Pedro!
@mohammadmohabsarhan3961
@mohammadmohabsarhan3961 3 ай бұрын
This was really very helpful to me, thank you so much bro.
@sanjay2102
@sanjay2102 6 ай бұрын
Awesome information brotha 👏
@abhinav788
@abhinav788 10 ай бұрын
Hello! Thank you very much for making this video. It really helped
@mdnuruddinadnan8
@mdnuruddinadnan8 Жыл бұрын
Thank you so much. This is the simple way to routing i found in youtube
@amrutjagtap5127
@amrutjagtap5127 Жыл бұрын
U r way of explanation is awesome bro..
@rachealiperu9375
@rachealiperu9375 Ай бұрын
nicely explained , very clear. thank you
@sandgar1001
@sandgar1001 Жыл бұрын
Thanks man, been building a full stack MERN app (while learning as I go) and this helped!
@savannahshannon7868
@savannahshannon7868 Жыл бұрын
Very helpful, better than my professor!
@Shiv-vb1re
@Shiv-vb1re 2 жыл бұрын
Thanks this is what i was looking for
@lamarlewis7638
@lamarlewis7638 Жыл бұрын
Great work… this helped a lot!
@stanislavus
@stanislavus Жыл бұрын
Brilliant explanation😀
@krishanthadharmasiri7725
@krishanthadharmasiri7725 6 күн бұрын
Pedro my man, thanks so much
@christmascatalogue
@christmascatalogue Жыл бұрын
You just helped me out a lot. I had all my node app in the app.js file. First time dev so...
@joek696
@joek696 2 жыл бұрын
finally i understood it , thank you
@user-qn7kq6yi5d
@user-qn7kq6yi5d 2 ай бұрын
I wonder why your subscribers didn't reach in millions yet. Your videos are so enlightening
@saumyakumarasinghe4531
@saumyakumarasinghe4531 Жыл бұрын
This was so helpful thank you so much
@richcaro3132
@richcaro3132 3 жыл бұрын
Wonderful explanation for routes . Thank you..
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Glad you liked it
@kacperstepien8640
@kacperstepien8640 Жыл бұрын
You helped me a lot bro, thanks
@amitpotghan9569
@amitpotghan9569 2 ай бұрын
hey You explained very well,Thanks
@ilhamadiputra4745
@ilhamadiputra4745 3 жыл бұрын
XD it's like you know what i want to learn bruh. Yesterday i read express documentation, just curious. And now your video about express is coming. Awesome and thank you xD
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Lmaoo Thanks Bro! I am happy you are liking the videos!
@user-um7tw6kx4r6
@user-um7tw6kx4r6 Жыл бұрын
This is really good thanks
@arnoldasmatijosius5154
@arnoldasmatijosius5154 Жыл бұрын
thanks, watched yours with interest.
@asadullah7324
@asadullah7324 2 жыл бұрын
I was finding this. thanks.
@mohammedsadiq5729
@mohammedsadiq5729 3 жыл бұрын
It's been a few days I couldn't watch your videos man! We are close to 2.5k 🔥💪
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Welcome back! Yeah we r going like crazy hahaha Thanks bro! You are one of my most loyal subs
@oussemabouyahia474
@oussemabouyahia474 Жыл бұрын
thank you you streamlined well this subject
@i-ush6349
@i-ush6349 Жыл бұрын
Thank you very much for this helpful video 👍
@octavioteixeira8304
@octavioteixeira8304 9 ай бұрын
Como é hábito, excelente produto! Parabéns!
@inspiredomkar1239
@inspiredomkar1239 9 ай бұрын
Great Video . Thanks...!
@sayeesreeram
@sayeesreeram Жыл бұрын
Great video 😊
@k.ashutoshbaitharu3964
@k.ashutoshbaitharu3964 Жыл бұрын
Best PORT number ever!
@oktoniuszevanyasimanungkal9554
@oktoniuszevanyasimanungkal9554 Жыл бұрын
THANK YOU SO MUCH
@Sumedha-0707
@Sumedha-0707 Жыл бұрын
Thank You Very Much
@itsnobledean9450
@itsnobledean9450 7 ай бұрын
I really appreciate the content you have provided. I mean, I've payed for a subscription to Udemy, but the teachers aren't the best. It's almost like they just want to talk. You, my friend, have created many videos with a a humble approach. You teach, give solid information, and you move on.
@miguelfonseca186
@miguelfonseca186 Жыл бұрын
Esse sotaque português! Bom vídeo, ajudou bastante
@maxx783
@maxx783 2 жыл бұрын
THANK YOU!
@thangphan6047
@thangphan6047 2 жыл бұрын
Thank you so much.
@JetProduction4579
@JetProduction4579 2 жыл бұрын
thank you sir, i appreciate
@iamakifislam
@iamakifislam 2 жыл бұрын
Huge Thanks
@adityaverma327
@adityaverma327 3 жыл бұрын
Thnx, u r so helpful...
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Happy to help!
@inhazfahim8270
@inhazfahim8270 2 жыл бұрын
Thank you so much!!
@Rin-dk1oo
@Rin-dk1oo Жыл бұрын
you saved my life
@michelgerges2678
@michelgerges2678 2 жыл бұрын
awesome video thank you
@michaelhuskey2608
@michaelhuskey2608 Жыл бұрын
Tutorials combining Express & Firebase Cloud Functions would be a great tutorial. Could even start demonstrating Backend for Front End Apps using Cloud Functions
@ZeshanMukhtar1
@ZeshanMukhtar1 11 ай бұрын
Thanks, love from Pakistan 💖
@guillaumedurant7647
@guillaumedurant7647 6 ай бұрын
Hi. Thank you my friend. I'va not understand yet, but I'm on the highway to success...
@ricky8466
@ricky8466 Жыл бұрын
thank you, GBU!
@Gwgitu77
@Gwgitu77 3 ай бұрын
Thank you
@oussamasadiki7377
@oussamasadiki7377 2 жыл бұрын
thanks lot bro well explained
@PedroTechnologies
@PedroTechnologies 2 жыл бұрын
Glad you liked it
@arirosen9764
@arirosen9764 Жыл бұрын
Thanks!
@imamamr
@imamamr Жыл бұрын
thanks a lot👍👍
@Pareshbpatel
@Pareshbpatel 2 жыл бұрын
Excellent introduction on Express Routing. Thanks. {2022-06-10}
@izarhalabi7354
@izarhalabi7354 Ай бұрын
some point arnt really clear but it worked ,thanks
@ClashRoyale-pt9zj
@ClashRoyale-pt9zj 10 ай бұрын
good video budy
@thesocialtalk1853
@thesocialtalk1853 Жыл бұрын
thank you
@nightowl5804
@nightowl5804 3 жыл бұрын
Thanks a lot😀
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Ur welcome! I am happy to help!
@Shellflower1234
@Shellflower1234 3 жыл бұрын
AMAZING
@salaheddineelfarissi101
@salaheddineelfarissi101 Жыл бұрын
Merci beaucoup
@dhruvkumar-br2lp
@dhruvkumar-br2lp 6 ай бұрын
Thanks
@supremeleader5516
@supremeleader5516 2 күн бұрын
thanks a lot
@williamdevonshire356
@williamdevonshire356 Жыл бұрын
perfect
@terryip487
@terryip487 Жыл бұрын
very like your vedio❤
@luiscazares8678
@luiscazares8678 Жыл бұрын
How this explain the routes so easy. Had a hard time debugging my app
@TheCodingOdyssey
@TheCodingOdyssey 3 жыл бұрын
we should coin a new phrase: Lets PedroTech and chill ha ha. New content every day.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Lmaoo Thanks Bro! Imma post everyday till I can't possibly do that hahaha Im in exam season so thats why im not posting saturdays, but new content comes out every day!
@TheCodingOdyssey
@TheCodingOdyssey 3 жыл бұрын
@@PedroTechnologies I'm impressed how you find the time bro! But honestly I think your channel will rise very fast! It will be called The rise of Pedro hhaha
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Hahaha I hope! 🙏 I start working at 6 am and stop around 8-9 pm lmaoo I do all my editing and posting in the morning, study the rest of the day, go to the gym at 2, go to my swe job at 6, record my next day's video at 10 hahaha Its been crazy, but I hope it pays off!
@TheCodingOdyssey
@TheCodingOdyssey 3 жыл бұрын
@@PedroTechnologies I love the grind mentality! much luck bro!
@gurpreetsandhu9530
@gurpreetsandhu9530 Жыл бұрын
hats off to your PORT number bro .👍😂😂
@sayhussain007
@sayhussain007 Жыл бұрын
Dears, Nice explanation, but what about if the call back function is controller, can you make simple recording on that too, it would be much appreciated
@manuelpineda924
@manuelpineda924 3 жыл бұрын
Awesome Video Thank You! You should do one for React as well.
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Thank you! I have a full React Router Dom Tutorial: kzbin.info/www/bejne/sHLIonugfbaIlbc
@rolandraphael9087
@rolandraphael9087 3 жыл бұрын
I know Im pretty randomly asking but do anyone know of a good website to watch newly released series online ?
@stanleydeclan4182
@stanleydeclan4182 3 жыл бұрын
@Roland Raphael try FlixZone. Just google for it :)
@javiermajor9522
@javiermajor9522 3 жыл бұрын
@Stanley Declan yup, I have been using Flixzone for since march myself :D
@rolandraphael9087
@rolandraphael9087 3 жыл бұрын
@Stanley Declan thank you, signed up and it seems like they got a lot of movies there :) I really appreciate it !
@CashHotel-xl2ih
@CashHotel-xl2ih 8 ай бұрын
Can you please tell how to design industry standard node js backend
@freddyfozzyfilms2688
@freddyfozzyfilms2688 2 жыл бұрын
nice port number
@emee__
@emee__ Жыл бұрын
Hello, any tutorial on subdomain routing in express?
@LearnCodingWithArshad
@LearnCodingWithArshad 6 ай бұрын
Thanks a lot really helpful video but it would have been better to use nodemon with it.
@shubhamtarkar38
@shubhamtarkar38 3 жыл бұрын
Noice port number
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Lmao I swear I didn't realize untill people started mentioning it
@shubhamtarkar38
@shubhamtarkar38 3 жыл бұрын
@@PedroTechnologies lol
@sk2279
@sk2279 2 жыл бұрын
Was gonna post the same
@kishorkumarsingh9072
@kishorkumarsingh9072 Жыл бұрын
Hi , i am beginner in react and wants to know the difference between React Router and Epress Js Router?
@sachintendulkar1122
@sachintendulkar1122 Жыл бұрын
Router is an object then how can we pass it to a middleware as middleware ( app.use()) required a function instead of object
@moussasangare5640
@moussasangare5640 3 жыл бұрын
Hello PedroTech , your tuto help me very well and thank for that , but i ' have an other question .I love node js but i don't know how to do some functionaly with it such as: users roles and permissions , and multiple database connection .
@PedroTechnologies
@PedroTechnologies 3 жыл бұрын
Hey, thank you! I have a video on user roles using react, node and express. However if you're not using react its the same idea, just create a role column in your database and use that to manage roles and permissions. Also, if you want to have two databases in your project, you can just connect to both of them the same way you would connect to one of them, but doing it twice.
@moussasangare5640
@moussasangare5640 3 жыл бұрын
@@PedroTechnologies Ok thanks sir
@kenaida22
@kenaida22 3 жыл бұрын
This isn't working with Heroku server, any suggestions?
@thesocialtalk1853
@thesocialtalk1853 Жыл бұрын
actually I've got the whole concept
@vin_27
@vin_27 20 күн бұрын
🥰
Learn Express Middleware In 14 Minutes
14:48
Web Dev Simplified
Рет қаралды 388 М.
Learn MVC Pattern with ExpressJS and NodeJS - Tutorial Beginner
10:10
Haha😂 Power💪 #trending #funny #viral #shorts
00:18
Reaction Station TV
Рет қаралды 15 МЛН
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 28 МЛН
Node and Express - Routes & Express Router
20:10
WittCode
Рет қаралды 3,2 М.
MySQL Node.js Express
28:03
Sam Meech-Ward
Рет қаралды 160 М.
ExpressJS Middleware Tutorial - NodeJS Middleware For Beginners
12:54
What are HTTP Headers in API
17:38
Piyush Garg
Рет қаралды 48 М.
Express Crash Course
1:46:11
Traversy Media
Рет қаралды 51 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,2 МЛН
YOTAPHONE 2 - СПУСТЯ 10 ЛЕТ
15:13
ЗЕ МАККЕРС
Рет қаралды 153 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2 МЛН
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 312 М.
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,4 МЛН