Тёмный

Refactor and Deployment CRUD API with Node.js, Express and MongoDB for Beginner - MVC in Node.js 

Devtamin
Подписаться 17 тыс.
Просмотров 19 тыс.
50% 1

Are you looking for a video tutorial to improve your Node.js API source code and improve skill your Node.js skill? in this video, I'm going to show you how to refactor Node.js code to make it more organized and cleaner . You will learn how to implement dotenv, create a custom middleware to handle an error, implement a MVC architecture, solve cors problems and deployment the Node.js project into a live server from Render.com. I will show you everything step-by-step, so you will understand it easily.
This video continues from "Build Restful CRUD API with Node.js, Express and MongoDB in 45 minutes for Beginners from Scratch". Here is the link if you want to check it out • Build Restful CRUD API...
★★★ Timeline ★★★
00:05 - Review the project and the previous video tutorial
01:10 - Create dotenv
04:50 - Refactor to the MVC pattern focusing on routes
11:27 - Refactor to the MVC pattern focusing on controllers
20:35 - Implement ErrorMiddleware
28:15 - Implement express-async-handler
33:26 - Implement Cors
37:26 - Configure Cors to support multiple domains
40:16 - Deploy Node.js to Github and Render
44:21- Create and Configure a webservice in Render
47:18- Update backend URL in a React frontend app
★★★ Source Code ★★★
Started Code - github.com/dev...
Finished Code - github.com/dev...
Frontend Code (React.js) - github.com/dev...

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 101   
@Srinivasan-tl9qd
@Srinivasan-tl9qd 2 месяца назад
i learned nodejs by watching your2 videos please continue to do nodejs videos do some advance projects please so we can learn so much from you , you are my savior , please continue posting vides on node
@Devtamin
@Devtamin Месяц назад
Thank you for a comment. I will do
@klirmio21
@klirmio21 Год назад
no wonder asians are so smart!! THANK YOU BRO!!! The previous video and this one is amazing - simple ,you explain everything and even more starting from the basics... I will follow your tutorial and change it a bit for my blog project, but it stiil feels like cheating and feels bad that I am unable to do it on my own.... But you did a great job, ty ty ty ty
@jasontube22
@jasontube22 10 месяцев назад
Thank you. I have spent this week reviewing your videos. You are a genius. I hope to see more videos from you. You are one of the few people who can make a video that is less than an hour with very much valuable information with clear and concise understanding. Now I have gone from beginner to intermediate with Node/Express/DotEnv/MVC/ErrorHandling/CorsPolicy/Deployment from watching your videos. I hope to see more to learn from. Next I will attempt the React front end portion. Thanks again.
@Devtamin
@Devtamin 10 месяцев назад
Wow, thank you! I'm so happy that my videos help you. Please, subscribe
@aminekoumni5075
@aminekoumni5075 7 месяцев назад
we need a video of how to use solid principles and design patterns in node.js@@Devtamin
@franjangonz
@franjangonz 6 месяцев назад
@@aminekoumni5075 im looking forward to this. hope he makes a tutorial!
@urstrulymaheshfan09
@urstrulymaheshfan09 10 месяцев назад
Thank you bro but I got module not found error when I put ./ And also ../ how can I resolve this can tell me
@wedadgamalelden
@wedadgamalelden 6 месяцев назад
🌟 **Thank You** Your playlist is incredibly helpful, The way you presented the material, focusing on the main points, made it easy to understand and apply Keep up the fantastic work and I look forward to more insightful content from you! 👏👍
@Devtamin
@Devtamin 6 месяцев назад
Glad it was helpful!
@ArianitLikaj
@ArianitLikaj Год назад
Hi Devtamin, i have a problem when i write const Product = require ('../models/productModel') , it will showed node:internal/modules/cjs/loader:1080 throw err; ^ Error: Cannot find module '../models/productModel' Can you help mw with this ?
@Devtamin
@Devtamin Год назад
checkout the code on github
@tanjane9280
@tanjane9280 4 месяца назад
pls do MERN Stack tutorial! amazing , subscribed!
@Devtamin
@Devtamin 4 месяца назад
Coming soon!
@kannanss75
@kannanss75 11 месяцев назад
Very good tutorial friend. Simple and Straight to point.
@ameyapotdar461
@ameyapotdar461 9 месяцев назад
can you make a multiuser CRUD using MERN with login logout register ?
@Devtamin
@Devtamin 9 месяцев назад
I will do soon
@DA-gu5rg
@DA-gu5rg 6 месяцев назад
After refactoring the controllers, i get the error product is not defined, how do i correct this?
@Devtamin
@Devtamin 6 месяцев назад
I cannot not really tell. Please, check the code on github
@Devtamin
@Devtamin Год назад
I just uploaded the video about how to build React JS CRUD operations connecting to NODE.js API, ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-57rKaQg0XDM.html
@victormayowa2829
@victormayowa2829 2 месяца назад
can you pin this comment, nice tutorial by the way😎😎
@tutosolve
@tutosolve Год назад
Hope you to be continued about Nodejs . You tutorial so easy to understand for new bie and senior . From King Vietnam
@wesonweb
@wesonweb Год назад
Great tutorial, thank you! Would be cool to see how you integrate React with the Express backend.
@Devtamin
@Devtamin Год назад
Coming soon!
@charles-sambo
@charles-sambo Год назад
@@Devtamin Waiting for that too :)
@dananjayachathuranga7113
@dananjayachathuranga7113 Год назад
@@Devtamin waiting for that
@Devtamin
@Devtamin Год назад
@@dananjayachathuranga7113 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-57rKaQg0XDM.html here is how to connect React JS with NODE.js API
@dersven4122
@dersven4122 9 месяцев назад
I cannot deploy the app. I get this error in the logs: npm ERR! enoent ENOENT: no such file or directory, open '/opt/render/project/src/package.json'
@vtingms2398
@vtingms2398 Год назад
which extension u use when the code is saved the auto run?
@Devtamin
@Devtamin 11 месяцев назад
nodemon
@itsnobledean9450
@itsnobledean9450 10 месяцев назад
So many videos, yet none like these. Every word that he speak is to teach. I appreciate you for the time and effort you sacrificed to educate us.
@Devtamin
@Devtamin 9 месяцев назад
Thank you for a comment
@malikwahab6276
@malikwahab6276 Год назад
Hey I loved your tutorials on nodejs CURD app. I learnt allot. Please add front end react , routes etc and authentication etc as well. I have subscribed and will watch all those tutorials as well. Thanks!
@spidercatte
@spidercatte 4 месяца назад
Thanks for the tutorial. Would you mind adding the tests part?
@bladetv7370
@bladetv7370 3 месяца назад
The previous video followed by this one are the best straight forward backend implementations using Node and express i have seen on the internet . To higher heights @Devtamin
@rifkiarza6590
@rifkiarza6590 Год назад
Thank you sir, you're very good at explaining my curiosity on how to connect front end with back end. Do you have any plan for your next video? Can't wait it
@Devtamin
@Devtamin Год назад
Yes, definitely. Please, subscribe
@trietminh7365
@trietminh7365 Год назад
i am a student and both of your videos are very helpful for me, thank you very much for this, hope your channel will develop more in the future
@Devtamin
@Devtamin Год назад
I hope so too! Thank you for a comment
@trietminh7365
@trietminh7365 Год назад
@@Devtamin I don't know how to make these functions work on the frontend yet
@tutosolve
@tutosolve Год назад
@@trietminh7365 oke hỏi lắm thế, google đi
@luther1024
@luther1024 Год назад
I love your videos. Can you do a video on how to do authorization and generate tokens using JWT
@Devtamin
@Devtamin Год назад
Sure, I'll publish it soon
@skrewed
@skrewed Год назад
Loving this series! Just a tiny minor feedback: be aware of typos (like 'proudct') and excess lines between code (like you've left in the Routes file), it can make people with OCD go insane! hahahaha
@Devtamin
@Devtamin Год назад
Sorry about that. Thank for correcting me
@sarthakkamble9864
@sarthakkamble9864 Год назад
When I use the error middleware and I am trying to input invalid ID it is not throwing me the `Cannot find any product with ID ${id}` instead it just throws me a error without my custom error message. Can you tell me what should I do?
@argosard
@argosard 9 месяцев назад
I might have a solution for you, if you have grouped your "app.use" with each other try to put you app.use(errorMiddleware) to the end of the list, it seems that if the middleware is used before the route he doesnt work
@argosard
@argosard 9 месяцев назад
For me it looks like this "app.use(express.json()); app.use(express.urlencoded({extended: false})); app.use('/user', userRoute); app.use('/playground', playgroundRoute); app.use(errorMiddleware);"
@isidoraaxis6179
@isidoraaxis6179 Год назад
Watching this after seeing the Basic API with node, suscribed!! great content! next comes The one with react....... do you have a video were you explain how to get your IP address to be used in the backend as you showed?? thats my only inquiry so far .. 💥
@Devtamin
@Devtamin 11 месяцев назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9OfL9H6AmhQ.html&lc=Ugyv48G3Gv3F7zOVF2R4AaABAg
@ybarvaliya8003
@ybarvaliya8003 Год назад
I was struggling with these concept and your both video made me these concept so clear. Thanks man!
@Devtamin
@Devtamin Год назад
Glad to hear it!
@first-choicecyber
@first-choicecyber 8 месяцев назад
I just completed my backend with this video. Again, pretty clear. I have to complete my frontend before the deployment to render. Thank you!
@Devtamin
@Devtamin 8 месяцев назад
You're welcome
@yisarasaq7888
@yisarasaq7888 8 месяцев назад
Thank you so much. I've seen a lot of videos but this is very interesting and clear. May God continue to bless you. Thank you again!!!
@Devtamin
@Devtamin 8 месяцев назад
Glad it was helpful!
@franjangonz
@franjangonz 6 месяцев назад
i'm about to finish his tutorial and it is by far one of the best videos i manage to catch up. i struggle learning moongose for a long time and yesterday was my first time that i understand and can catch up throughout his instructions. I'm a beginner in learning full stack and i highly recommend subscribing to him!
@Devtamin
@Devtamin 6 месяцев назад
Glad I could help!
@rinpov1466
@rinpov1466 Год назад
Thank you sir, your video is useful for me that i just start learn backend with nodejs. I really like your explanation . Can you do more with authentication and tokens using JWT?
@Devtamin
@Devtamin Год назад
Will upload soon
@larrygoodman2442
@larrygoodman2442 10 месяцев назад
Thank you for this video. I will be applying the concepts to my current ticket!
@Devtamin
@Devtamin 10 месяцев назад
Best of luck!
@kevin-howard
@kevin-howard Год назад
Very good video ! Thank you for sharing ❤
@Devtamin
@Devtamin Год назад
You are so welcome!
@NasriDevLab
@NasriDevLab 8 месяцев назад
Thank you bro 🥰
@Devtamin
@Devtamin 8 месяцев назад
Welcome 😊
@ol1175
@ol1175 Год назад
Thanks a lot, waiting for Auth
@Devtamin
@Devtamin 11 месяцев назад
Will do it
@ol1175
@ol1175 11 месяцев назад
Thanks man
@doruktekel3438
@doruktekel3438 6 месяцев назад
hello dev i just want to ask smthing , when we gonna use asyncHandler why we use try catch and error block , it already use if we use the asyncHandler , i guess so we shouldnt use try catct and error handling
@doruktekel3438
@doruktekel3438 6 месяцев назад
by the way thaks a lot for these videos , i learned lots of things
@kulakburunbox
@kulakburunbox Год назад
29:54
@Aravindh143s
@Aravindh143s 2 месяца назад
Hey I learnt new concept express-async-handler middleware...
@geoffreymatieso6122
@geoffreymatieso6122 8 месяцев назад
From Beggineer to Intermediate . That ka Feeling. Thank you .
@Devtamin
@Devtamin 8 месяцев назад
You're welcome
@zebdayacine4024
@zebdayacine4024 Год назад
loving your video it was very simple without complications thank you too much sir
@Devtamin
@Devtamin Год назад
You're welcome. Thank you for a comment
@TheAllrounderBanda
@TheAllrounderBanda Год назад
One thing to say u ...... I love u bro 😍🙏🙏🙏
@Devtamin
@Devtamin Год назад
Love your comment
@lewismunene5534
@lewismunene5534 Год назад
What a great tutorial! Thank you sir
@Devtamin
@Devtamin Год назад
You're very welcome!
@Pareshbpatel
@Pareshbpatel 3 месяца назад
{2023-12-18}, {2024-06-10}
@golamrabbani4499
@golamrabbani4499 Месяц назад
This was soo brilliant
@Devtamin
@Devtamin Месяц назад
Thank you for a comment
@UnrealDoctor
@UnrealDoctor 10 месяцев назад
Great tutorial !
@Devtamin
@Devtamin 10 месяцев назад
Thank you for a comment
@johnvick8861
@johnvick8861 Год назад
Just add authentication like user role or something might be great.. as i want to learn both java and nodejs for project purpose seems similar lol.
@Devtamin
@Devtamin Год назад
Noted
@adnaneabid7274
@adnaneabid7274 Год назад
I learned a lot from your video, I hope you'll share more. Thanks for everything
@Devtamin
@Devtamin Год назад
More to come!
@caretib4283
@caretib4283 Год назад
is there a chance sir you will have a tutorial about making the front end of this project using react? thank you
@Devtamin
@Devtamin Год назад
I have published it. Pls, check it out
@TRỊNHNgọcTú-g9r
@TRỊNHNgọcTú-g9r Год назад
Very good video, may you make another one to explain the frontend part used in this video?
@Devtamin
@Devtamin Год назад
here is how to connect React JS with NODE.js API, ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-57rKaQg0XDM.html
@oanuchai2752
@oanuchai2752 5 месяцев назад
goodddd
@Devtamin
@Devtamin 5 месяцев назад
Good to hear it
@thinhpham9788
@thinhpham9788 Год назад
Thanks for sharing this video , your videos are very helpful for me
@Devtamin
@Devtamin Год назад
Glad to hear that
@tutosolve
@tutosolve Год назад
oke em
@captainshanab
@captainshanab Год назад
Thank you 👍👍👍👍👍
@Devtamin
@Devtamin Год назад
Welcome 😊
Далее
FATAL CHASE 😳 😳
00:19
Просмотров 1,5 млн
Laravel CRUD in 50 minutes for Beginners  from Scratch
49:58
CRUD REST API using Node | Express | MongoDB
52:35
Просмотров 380 тыс.
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23