MERN Stack Tutorial #6 - Controllers (part 1)

preview_player
Показать описание
In this MERN tutorial we'll make some controller functions for the workout routes.

⭐⭐ Get the full course now (without ads) on the Net Ninja Pro site:

⭐⭐ Get access to all free & PREMIUM courses on Net Ninja Pro:

🥷 Course Files (GitHub):

💻 MongoDB Crash Course:

💻 React Full Courses:

🔥🔥🔥 Other resources:
Рекомендации по теме
Комментарии
Автор

I have to admit you are the best teacher on YouTube currently. I have done tutorial after tutorial and everyone is so good at what they they do, that they make sure to leave out a step or two that leaves their tutorial incomplete for the person following. You however covered all bases and I sincerely appreciate that. I am a self taught developer from Africa, building experiences for faith based organizations out here. Great work you are doing. I am considering opening a school here in the future, but I would need a teaching model similar to yours. Thanks again.

inchristtvke
Автор

Such an amazing content! As always! By the way, I love the folder name reveal at 0:45. Do what you do, because you're the ***KING best!

stanisawjarocki
Автор

This tutorial is great because you're explaining what you're doing and why you're doing it. You really are a ninja!

dawn_signal
Автор

This series is really good. Thank you.

williamlawrence
Автор

I love your videos. Coming from a python background javascript was intimidating for me.But your clear explanation helps me understand better. Thanks man.

neosebanze
Автор

I started watching this series just for a specific thing in postman, which I found in the last video, about having to send it as json rather than form data for the page im building. You're teaching style is great though, Thanks for the content!

jonathantowery
Автор

you are one of my best tutors on YouTube and Udemy.

inspirationalquotes
Автор

Can't wait for the auth part of the series!! Great course Shaun!

alonsofrias
Автор

Thank you very much
I learn a lot from your videos

shir
Автор

Great videos so far! in awe that with 13k views only 440 likes. Keep it up !!

hirealgore
Автор

Hello, i have my file structure set up the same way as you, but when I added the controller file to /routes/workout.js, it kept telling me it cannot find the controllers file...

maikhanhduong
Автор

@The Net Ninja could you show us how to deploy this project to atleast 2 host i.e heroku or a cloud provider with all the configurations when you finish the series

johnstoneongera
Автор

Hi Shaun, I'm just wondering why in your getWorkout, you use such if method to check for errors, why didn't you use the try catch like you did for post? Because I tried using try catch and when I entered an invalid ID, it gives me my desired error message

dannelmulja
Автор

Hello Shaun, could you please explain why you didn't use the try/catch block when you trying to find workout by ID, or it wouldn't work? Thanks for the reply in advance. Also, I want to say that your tutorials are just amazing, and your way of explaining is really clear and structured even for beginners. I love your tutorials, definitely, you are doing a great job.

aleksandrkravchenko
Автор

Is there a reason why when creating the other two controllers you did not use a try/catch instead? Is this just a preference/showing several ways of doing the same thing? Thanks

andromilk
Автор

Sup ninja, are u following any pattern (like MVC)? i'm used to Routes being Controller and Controller being Service. Greate tutorial as always (huge fan here)

cecon
Автор

Thanks Shaun! Just wondering do uou have any plans to do tutorials on .net core in the future??

zarakikenpaachi
Автор

I included check for Id but I am still getting Cast Error. In Postman, it is working as expected, I am getting cast error in terminal. Can anyone suggest some solution. TIA.

abhilashsinghal
Автор

When I get the Get request terminal gives me that error : "TypeError: Converting circular structure to JSON". I did not understand why

ugursahin
Автор

I actually got a problem with the GET request, idk why but my POST req works fine and i've checked everything i could on the api, the routes, everything but i couldnt figure out why both GET all and GET single workout request isnt working on Postman, its just stuck on "Sending Request" forever and does not return any error or message which could be solved, what should i do now???

sanjaykarthick