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

  Рет қаралды 17,659

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...

Пікірлер: 95
@jasontube22
@jasontube22 7 ай бұрын
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 7 ай бұрын
Wow, thank you! I'm so happy that my videos help you. Please, subscribe
@aminekoumni5075
@aminekoumni5075 3 ай бұрын
we need a video of how to use solid principles and design patterns in node.js@@Devtamin
@franjangonz
@franjangonz 3 ай бұрын
@@aminekoumni5075 im looking forward to this. hope he makes a tutorial!
@itsnobledean9450
@itsnobledean9450 6 ай бұрын
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 6 ай бұрын
Thank you for a comment
@klirmio21
@klirmio21 10 ай бұрын
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
@kannanss75
@kannanss75 8 ай бұрын
Very good tutorial friend. Simple and Straight to point.
@franjangonz
@franjangonz 3 ай бұрын
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 3 ай бұрын
Glad I could help!
@ybarvaliya8003
@ybarvaliya8003 Жыл бұрын
I was struggling with these concept and your both video made me these concept so clear. Thanks man!
@Devtamin
@Devtamin 11 ай бұрын
Glad to hear it!
@wedadgamalelden
@wedadgamalelden 3 ай бұрын
🌟 **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 2 ай бұрын
Glad it was helpful!
@yisarasaq7888
@yisarasaq7888 5 ай бұрын
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 4 ай бұрын
Glad it was helpful!
@geoffreymatieso6122
@geoffreymatieso6122 5 ай бұрын
From Beggineer to Intermediate . That ka Feeling. Thank you .
@Devtamin
@Devtamin 5 ай бұрын
You're welcome
@first-choicecyber
@first-choicecyber 5 ай бұрын
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 4 ай бұрын
You're welcome
@lewismunene5534
@lewismunene5534 10 ай бұрын
What a great tutorial! Thank you sir
@Devtamin
@Devtamin 9 ай бұрын
You're very welcome!
@bladetv7370
@bladetv7370 17 күн бұрын
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
@tutosolve
@tutosolve 11 ай бұрын
Hope you to be continued about Nodejs . You tutorial so easy to understand for new bie and senior . From King Vietnam
@larrygoodman2442
@larrygoodman2442 7 ай бұрын
Thank you for this video. I will be applying the concepts to my current ticket!
@Devtamin
@Devtamin 7 ай бұрын
Best of luck!
@zebdayacine4024
@zebdayacine4024 10 ай бұрын
loving your video it was very simple without complications thank you too much sir
@Devtamin
@Devtamin 10 ай бұрын
You're welcome. Thank you for a comment
@kevin-howard
@kevin-howard Жыл бұрын
Very good video ! Thank you for sharing ❤
@Devtamin
@Devtamin Жыл бұрын
You are so welcome!
@malikwahab6276
@malikwahab6276 11 ай бұрын
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!
@adnaneabid7274
@adnaneabid7274 11 ай бұрын
I learned a lot from your video, I hope you'll share more. Thanks for everything
@Devtamin
@Devtamin 9 ай бұрын
More to come!
@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 11 ай бұрын
@@trietminh7365 oke hỏi lắm thế, google đi
@UnrealDoctor
@UnrealDoctor 7 ай бұрын
Great tutorial !
@Devtamin
@Devtamin 7 ай бұрын
Thank you for a comment
@skrewed
@skrewed 11 ай бұрын
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 11 ай бұрын
Sorry about that. Thank for correcting me
@wesonweb
@wesonweb 11 ай бұрын
Great tutorial, thank you! Would be cool to see how you integrate React with the Express backend.
@Devtamin
@Devtamin 11 ай бұрын
Coming soon!
@charles-sambo
@charles-sambo 11 ай бұрын
@@Devtamin Waiting for that too :)
@dananjayachathuranga7113
@dananjayachathuranga7113 11 ай бұрын
@@Devtamin waiting for that
@Devtamin
@Devtamin 10 ай бұрын
@@dananjayachathuranga7113 kzbin.info/www/bejne/a2jVfJSHnJWLeq8 here is how to connect React JS with NODE.js API
@thinhpham9788
@thinhpham9788 11 ай бұрын
Thanks for sharing this video , your videos are very helpful for me
@Devtamin
@Devtamin 11 ай бұрын
Glad to hear that
@tutosolve
@tutosolve 11 ай бұрын
oke em
@mohamedabdihakinmuhumed3731
@mohamedabdihakinmuhumed3731 5 ай бұрын
Thank you bro 🥰
@Devtamin
@Devtamin 5 ай бұрын
Welcome 😊
@spidercatte
@spidercatte Ай бұрын
Thanks for the tutorial. Would you mind adding the tests part?
@isidoraaxis6179
@isidoraaxis6179 9 ай бұрын
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 8 ай бұрын
kzbin.info/www/bejne/b4DJfWx-a6agnrM&lc=Ugyv48G3Gv3F7zOVF2R4AaABAg
@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
@visionlargawithsaleem4892
@visionlargawithsaleem4892 11 ай бұрын
One thing to say u ...... I love u bro 😍🙏🙏🙏
@Devtamin
@Devtamin 11 ай бұрын
Love your comment
@captainshanab5525
@captainshanab5525 10 ай бұрын
Thank you 👍👍👍👍👍
@Devtamin
@Devtamin 9 ай бұрын
Welcome 😊
@tanjane9280
@tanjane9280 Ай бұрын
pls do MERN Stack tutorial! amazing , subscribed!
@Devtamin
@Devtamin 27 күн бұрын
Coming soon!
@Devtamin
@Devtamin 10 ай бұрын
I just uploaded the video about how to build React JS CRUD operations connecting to NODE.js API, kzbin.info/www/bejne/a2jVfJSHnJWLeq8
@rinpov1466
@rinpov1466 11 ай бұрын
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 11 ай бұрын
Will upload soon
@ol1175
@ol1175 9 ай бұрын
Thanks a lot, waiting for Auth
@Devtamin
@Devtamin 8 ай бұрын
Will do it
@ol1175
@ol1175 8 ай бұрын
Thanks man
@user-hm8hx4ko5g
@user-hm8hx4ko5g 11 ай бұрын
Very good video, may you make another one to explain the frontend part used in this video?
@Devtamin
@Devtamin 10 ай бұрын
here is how to connect React JS with NODE.js API, kzbin.info/www/bejne/a2jVfJSHnJWLeq8
@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
@oanuchai2752
@oanuchai2752 Ай бұрын
goodddd
@Devtamin
@Devtamin Ай бұрын
Good to hear it
@urstrulymaheshfan09
@urstrulymaheshfan09 7 ай бұрын
Thank you bro but I got module not found error when I put ./ And also ../ how can I resolve this can tell me
@doruktekel3438
@doruktekel3438 3 ай бұрын
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 3 ай бұрын
by the way thaks a lot for these videos , i learned lots of things
@caretib4283
@caretib4283 11 ай бұрын
is there a chance sir you will have a tutorial about making the front end of this project using react? thank you
@Devtamin
@Devtamin 9 ай бұрын
I have published it. Pls, check it out
@kulakburunbox
@kulakburunbox 9 ай бұрын
29:54
@vtingms2398
@vtingms2398 8 ай бұрын
which extension u use when the code is saved the auto run?
@Devtamin
@Devtamin 8 ай бұрын
nodemon
@johnvick8861
@johnvick8861 11 ай бұрын
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 9 ай бұрын
Noted
@ameyapotdar461
@ameyapotdar461 6 ай бұрын
can you make a multiuser CRUD using MERN with login logout register ?
@Devtamin
@Devtamin 6 ай бұрын
I will do soon
@user-tr3ly5iw6j
@user-tr3ly5iw6j 9 ай бұрын
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 9 ай бұрын
checkout the code on github
@dersven4122
@dersven4122 6 ай бұрын
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'
@sarthakkamble9864
@sarthakkamble9864 10 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
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);"
@DA-gu5rg
@DA-gu5rg 2 ай бұрын
After refactoring the controllers, i get the error product is not defined, how do i correct this?
@Devtamin
@Devtamin 2 ай бұрын
I cannot not really tell. Please, check the code on github
@Pareshbpatel
@Pareshbpatel 13 күн бұрын
{2023-12-18}, {2024-06-10}
Laravel CRUD in 50 minutes for Beginners  from Scratch
49:58
Devtamin
Рет қаралды 180 М.
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 11 МЛН
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 9 МЛН
Backstage 🤫 tutorial #elsarca #tiktok
00:13
Elsa Arca
Рет қаралды 46 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН
Build a Rest Api with NodeJS (JavaScript), Express, and PostgreSQL
1:07:53
CRUD REST API using Node | Express | MongoDB
52:35
Telusko
Рет қаралды 371 М.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 70 М.
Build a REST API with Node JS and Express | CRUD API Tutorial
1:01:16
JavaScript Mastery
Рет қаралды 514 М.
Complete CRUD Application with Node, Express & MongoDB
2:39:38
Daily Tuition
Рет қаралды 651 М.
Node.js - Top 30 Interview Questions and Answers for Beginners
1:07:23
Interview Happy
Рет қаралды 45 М.
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 11 МЛН