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

  Рет қаралды 18,309

Devtamin

Devtamin

Жыл бұрын

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/devtamin/Node-API
Finished Code - github.com/devtamin/Node-API-V2
Frontend Code (React.js) - github.com/devtamin/React-For...

Пікірлер: 98
@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
@klirmio21
@klirmio21 11 ай бұрын
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
@bladetv7370
@bladetv7370 Ай бұрын
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
@kannanss75
@kannanss75 9 ай бұрын
Very good tutorial friend. Simple and Straight to point.
@jasontube22
@jasontube22 8 ай бұрын
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 8 ай бұрын
Wow, thank you! I'm so happy that my videos help you. Please, subscribe
@aminekoumni5075
@aminekoumni5075 5 ай бұрын
we need a video of how to use solid principles and design patterns in node.js@@Devtamin
@franjangonz
@franjangonz 4 ай бұрын
@@aminekoumni5075 im looking forward to this. hope he makes a tutorial!
@itsnobledean9450
@itsnobledean9450 8 ай бұрын
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 7 ай бұрын
Thank you for a comment
@tutosolve
@tutosolve Жыл бұрын
Hope you to be continued about Nodejs . You tutorial so easy to understand for new bie and senior . From King Vietnam
@wedadgamalelden
@wedadgamalelden 4 ай бұрын
🌟 **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 4 ай бұрын
Glad it was helpful!
@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!
@lewismunene5534
@lewismunene5534 11 ай бұрын
What a great tutorial! Thank you sir
@Devtamin
@Devtamin 10 ай бұрын
You're very welcome!
@yisarasaq7888
@yisarasaq7888 6 ай бұрын
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 6 ай бұрын
Glad it was helpful!
@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!
@larrygoodman2442
@larrygoodman2442 8 ай бұрын
Thank you for this video. I will be applying the concepts to my current ticket!
@Devtamin
@Devtamin 8 ай бұрын
Best of luck!
@franjangonz
@franjangonz 4 ай бұрын
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 4 ай бұрын
Glad I could help!
@kevin-howard
@kevin-howard Жыл бұрын
Very good video ! Thank you for sharing ❤
@Devtamin
@Devtamin Жыл бұрын
You are so welcome!
@zebdayacine4024
@zebdayacine4024 11 ай бұрын
loving your video it was very simple without complications thank you too much sir
@Devtamin
@Devtamin 11 ай бұрын
You're welcome. Thank you for a comment
@adnaneabid7274
@adnaneabid7274 Жыл бұрын
I learned a lot from your video, I hope you'll share more. Thanks for everything
@Devtamin
@Devtamin 10 ай бұрын
More to come!
@first-choicecyber
@first-choicecyber 6 ай бұрын
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 6 ай бұрын
You're welcome
@geoffreymatieso6122
@geoffreymatieso6122 6 ай бұрын
From Beggineer to Intermediate . That ka Feeling. Thank you .
@Devtamin
@Devtamin 6 ай бұрын
You're welcome
@UnrealDoctor
@UnrealDoctor 8 ай бұрын
Great tutorial !
@Devtamin
@Devtamin 8 ай бұрын
Thank you for a comment
@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
@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
@thinhpham9788
@thinhpham9788 Жыл бұрын
Thanks for sharing this video , your videos are very helpful for me
@Devtamin
@Devtamin Жыл бұрын
Glad to hear that
@tutosolve
@tutosolve Жыл бұрын
oke em
@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 11 ай бұрын
@@dananjayachathuranga7113 kzfaq.info/get/bejne/a52ifsSCzJa8dIE.html here is how to connect React JS with NODE.js API
@isidoraaxis6179
@isidoraaxis6179 10 ай бұрын
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 9 ай бұрын
kzfaq.info/get/bejne/b7WWf5x5m6fRmIU.html&lc=Ugyv48G3Gv3F7zOVF2R4AaABAg
@mohamedabdihakinmuhumed3731
@mohamedabdihakinmuhumed3731 6 ай бұрын
Thank you bro 🥰
@Devtamin
@Devtamin 6 ай бұрын
Welcome 😊
@tanjane9280
@tanjane9280 2 ай бұрын
pls do MERN Stack tutorial! amazing , subscribed!
@Devtamin
@Devtamin 2 ай бұрын
Coming soon!
@spidercatte
@spidercatte 2 ай бұрын
Thanks for the tutorial. Would you mind adding the tests part?
@captainshanab5525
@captainshanab5525 Жыл бұрын
Thank you 👍👍👍👍👍
@Devtamin
@Devtamin 10 ай бұрын
Welcome 😊
@visionlargawithsaleem4892
@visionlargawithsaleem4892 Жыл бұрын
One thing to say u ...... I love u bro 😍🙏🙏🙏
@Devtamin
@Devtamin Жыл бұрын
Love your comment
@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
@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
@oanuchai2752
@oanuchai2752 3 ай бұрын
goodddd
@Devtamin
@Devtamin 3 ай бұрын
Good to hear it
@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
@urstrulymaheshfan09
@urstrulymaheshfan09 8 ай бұрын
Thank you bro but I got module not found error when I put ./ And also ../ how can I resolve this can tell me
@ol1175
@ol1175 10 ай бұрын
Thanks a lot, waiting for Auth
@Devtamin
@Devtamin 9 ай бұрын
Will do it
@ol1175
@ol1175 9 ай бұрын
Thanks man
@user-hm8hx4ko5g
@user-hm8hx4ko5g Жыл бұрын
Very good video, may you make another one to explain the frontend part used in this video?
@Devtamin
@Devtamin 11 ай бұрын
here is how to connect React JS with NODE.js API, kzfaq.info/get/bejne/a52ifsSCzJa8dIE.html
@kulakburunbox
@kulakburunbox 11 ай бұрын
29:54
@Aravindh143s
@Aravindh143s 6 күн бұрын
Hey I learnt new concept express-async-handler middleware...
@dersven4122
@dersven4122 7 ай бұрын
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'
@user-tr3ly5iw6j
@user-tr3ly5iw6j 11 ай бұрын
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 10 ай бұрын
checkout the code on github
@Devtamin
@Devtamin 11 ай бұрын
I just uploaded the video about how to build React JS CRUD operations connecting to NODE.js API, kzfaq.info/get/bejne/a52ifsSCzJa8dIE.html
@victormayowa2829
@victormayowa2829 13 күн бұрын
can you pin this comment, nice tutorial by the way😎😎
@DA-gu5rg
@DA-gu5rg 4 ай бұрын
After refactoring the controllers, i get the error product is not defined, how do i correct this?
@Devtamin
@Devtamin 4 ай бұрын
I cannot not really tell. Please, check the code on github
@doruktekel3438
@doruktekel3438 4 ай бұрын
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 4 ай бұрын
by the way thaks a lot for these videos , i learned lots of things
@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 10 ай бұрын
Noted
@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 10 ай бұрын
I have published it. Pls, check it out
@sarthakkamble9864
@sarthakkamble9864 11 ай бұрын
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 7 ай бұрын
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 7 ай бұрын
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);"
@vtingms2398
@vtingms2398 10 ай бұрын
which extension u use when the code is saved the auto run?
@Devtamin
@Devtamin 9 ай бұрын
nodemon
@ameyapotdar461
@ameyapotdar461 7 ай бұрын
can you make a multiuser CRUD using MERN with login logout register ?
@Devtamin
@Devtamin 7 ай бұрын
I will do soon
@Pareshbpatel
@Pareshbpatel Ай бұрын
{2023-12-18}, {2024-06-10}
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 14 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 20 МЛН
Женская драка в Кызылорде
00:53
AIRAN
Рет қаралды 494 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 102 МЛН
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
Sam Meech-Ward
Рет қаралды 109 М.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 76 М.
Laravel CRUD in 50 minutes for Beginners  from Scratch
49:58
Devtamin
Рет қаралды 194 М.
Build A Restful Api With Node.js Express & MongoDB | Rest Api Tutorial
53:55
Build a CRUD API with Docker Node.JS Express.JS & PostgreSQL
26:02
MVC Pattern Explained Easy | MVC Tutorial (Example in NodeJS)
17:05
Build a REST API with Node JS and Express | CRUD API Tutorial
1:01:16
JavaScript Mastery
Рет қаралды 519 М.
Easy Way to Create CLI Scripts with JavaScript and Node
17:39
James Q Quick
Рет қаралды 49 М.
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 14 МЛН