Building A Rest API with NodeJS and ExpressJS | Beginners Tutorial
Жүктеу.....
Пікірлер: 81
@AbdulAhad-rg3uy3 жыл бұрын
I've been watching videos the whole day trying to understand the basics of express and connecting to database , and this one is truly the best one out there .
@PedroTechnologies
3 жыл бұрын
Great to hear! I am really happy you enjoyed it!
@deetee26453 жыл бұрын
Good stuff! Just one thing - you skipped creating MySQL DB server but understandable if it would've taken a while to explain that as well. For those who have docker you can run the following 3 commands to run a mysql DB image: docker pull mysql docker network create my-net docker run -it --network my-net -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=password -d mysql
@PedroTechnologies
3 жыл бұрын
Yes! I pinned you in case someone wants to know this. Tbh I was in doubt on if I should have shown the implementation of a DB or not due to time. I chose to do so at the end but it came with the cost of not explaining everything thoroughly. THank you for posting this!
@deetee2645
3 жыл бұрын
@@PedroTechnologies For sure! I added exact commands that can be ran
@MarioLariosOfficial Жыл бұрын
I can't believe I haven't ran into your videos, they are the best explanations out there.
@richardogujawa-oldaccount1336 Жыл бұрын
Quick Tips: Dunno if someone already mentioned these but... 1) You can bypass having to press Enter for all the prompts/questions you're asked when you do "npm init", if you do "npm init -y" instead. The -y flag means "say yes to everything." 2) If the server your running is set up in the default file or the entry point (to check what the entry point is just look at the value assigned to the key "main" in your package.json file) you could just do "node ." . The dot at the end just means to run default file in the current directory. Great video by the way Pedro, learned a lot!
@sahilyadav3782
Жыл бұрын
Thanks a lot for the tips!
@ashoklrawat22873 жыл бұрын
i found your channel yesterday and now i'm watching all your video one by one...
@PedroTechnologies
3 жыл бұрын
Hahaha Welcome! I am glad you are enjoying the videos!
@shankarbaddi44243 жыл бұрын
Explanation is awesome, easy to understand. Thanks for the video.
@PedroTechnologies
3 жыл бұрын
Glad it was helpful!
@touche8020 Жыл бұрын
Great tutorial! Really appreciate it🙏🏾Just subscribed and gonna check out more of your videos!😁
@samuelonowuko1103 жыл бұрын
Really nice one. Simple and straight to the point
@PedroTechnologies
3 жыл бұрын
Thank you! Really appreciate!
@itsnobledean94508 ай бұрын
This is the perfect introduction for building an API.
@Rakibul-Hasan-Mahin3 жыл бұрын
Trust me one of the BEST KZreadr, I am not getting why arent you in the spotlight? There isn't much resource about backend in youtube and you got them. Congrats
@PedroTechnologies
3 жыл бұрын
Hahaha thank you so much! I really appreciate the support!
@Rakibul-Hasan-Mahin
3 жыл бұрын
I would like to work on some kind of project with you one day. Best of luck with your future, you got any social media or sth??
@ahmadfaraz36783 жыл бұрын
Please create video on JWT authentication in NodeJS
@PedroTechnologies
3 жыл бұрын
Should make one soon!
@CCIBN3 жыл бұрын
First of all, thank you for this great tutorials, it's a wonderfull experience to see how you teach:). It would be awesome for us, your suscribers to see you teaching us building a rest api, with react, node, mysql and using multiple tables to the see the associations taking place like one to many, many to many..or Join (INNER, OUTER, LEFT, RIGHT, etc..) tables based on id. Thank you once more and keep the good work!
@PedroTechnologies
3 жыл бұрын
Thank you so much! I have been planning on a video on associations, just don't know when I will be able to post it! However it will be pretty soon!
@ramgopal2411 ай бұрын
Thank You Mr. Pedro Nice One !
@mathewsmachadoamorim55573 жыл бұрын
Hey man, nice video for beginners! It would be awesome if you could make a video like this one, but using the intermediate folder structure for Express API'S that you showed on a previous video. I really want to know how a controller relates to a service, and so on.
@PedroTechnologies
3 жыл бұрын
Yes! I plan on making one! That project structure was based on the MVC model, so I should bring an MVC video any time soon!
@abhishekrawat85793 жыл бұрын
hey pedro after useRef tutorial I came up with that it's very easy to work bhi dom manipulation in react... and before it I'm stuck in some point that how I work with document object. And after learning useRef hook. I can easily manipulate dom elements. Thanks buddy❤️🔥 And I watching this tutorial to learn more about rest api.
@PedroTechnologies
3 жыл бұрын
Awesome!! Really glad that you are watching the videos and learning from them!
@k303k Жыл бұрын
Thanks for the video Pedro!!!
@cristianpichatiesa3 жыл бұрын
This channel is awesome.
@PedroTechnologies
3 жыл бұрын
I appreciate that!
@Jimmy-zw9ve3 жыл бұрын
Man what are the odds? I just wanted to learn Restful API and here you are. I was so confused about the "stateless" in Restful and I searched online that using Json Web Token(JWT) for authentication is a stateless operation. I just followed your previous video about it but is that a Restful stateless example? Thank you Pedro for the tutorials!
@PedroTechnologies
3 жыл бұрын
Awesome! By stateless it menas that the backend shouldn't keep track of the state of the client. Meaning that if a user signs in with a JWT, then the client has to store the token. THe server must receive the token from the client and validate it.
@engespress3 жыл бұрын
That's a very good tutorial. Good error handling.
@PedroTechnologies
3 жыл бұрын
Glad you liked it!
@nnabenjamin Жыл бұрын
I love your tutorials
@thangphan60472 жыл бұрын
Thank you so much, really appreciate it :)
@gloriajeptepkeny69082 жыл бұрын
Thank you so much for the video ..the explanation is very clear
@brystyle3 жыл бұрын
Thank you for the tutorial! 😊 Pedro, 2 weeks ago you saved my university project with your React-Node CRUD tutorial. So thank you for that, too! I have a question. I would like to make an image gallery CRUD with image files and data like the picture's name, description, date etc. ) And I would like to make it with React, Node.Js (express) and mySQL, but I don't really find a tutorial with this combination. Maybe can I ask you to make a video about an image CRUD like this? If so, I would be the first one to watch it. Also I recommended your tutorials to my classmates and friends! 😊 (you explain better than some of my teachers haha)
@PedroTechnologies
3 жыл бұрын
I have a video on images in react! I use cloudinary! Here is the link: kzread.info/dash/bejne/i2GKycOLp7q5Y9I.html . THank you for recommending the channel! Really appreciate it!
@alanwalker5845
3 жыл бұрын
omg which university is it that teachs React and Node.js?
@brystyle
3 жыл бұрын
@@alanwalker5845Eszterházy Károly University in Hungary :P Unfortunately we just got a little insight in React. Then we had to learn from the net and make the projects by ourselves...
@matthew4233 жыл бұрын
Thanks for this Excellent tutorial dude!
@PedroTechnologies
3 жыл бұрын
Glad it was helpful!
@trijaymadhu4462 Жыл бұрын
Great Tutorial
@aneeqrehman41383 жыл бұрын
i love your tutorials
@PedroTechnologies
3 жыл бұрын
Thank you! Really glad you like them!
@Tyz96ion3 жыл бұрын
great tutorial man! Love you
@PedroTechnologies
3 жыл бұрын
Glad you enjoyed! Thakn you for the support!
@ashoklrawat22873 жыл бұрын
your video is very good and explanation is very clear... so please continue making video on MERN Stack and also React js with firebase auth and database...
@PedroTechnologies
3 жыл бұрын
Thank you! I plan on more MERN videos!
@ashoklrawat2287
3 жыл бұрын
@@PedroTechnologies thank u brother... And can you please make a video on how to implement quill js or draft js rich test editor in react with making a full blog web app... Because now I'm totally depend on your channel, to learn and become MERN STACK developer , you explain everything in a very simple way... Your are very good in teaching and explaining ..❤️❤️👍👍 thank you again brother for making videos for us.. thank
@ethanhunt937 Жыл бұрын
Well this is dope!
@hijuliansosa3 жыл бұрын
Thanks, a really good video tutorial!
@ThColinPereira3 жыл бұрын
This is an amazing video! Thank you
@TheNamesJT2 жыл бұрын
33:00 couldn't you of used the npm package uuid then added some logic to the post request and put request? like const newUser = req.body then do if newUser._id === " " then you would just do newUser._id = uuidv4() which would auto generate you a id if the key: value is empty. You could of also added more logic for if the !newUser._id meaning if there isn't a _id in the request then you could throw an error saying add the _id key with an empy value string to have it auto generate.
@adante4073 жыл бұрын
Great tutorial thanks. Subscribed. 👍 how do you get the purple on VS code by the way?
@PedroTechnologies
3 жыл бұрын
Thank you! I use a theme called "Palenight Theme"
@adante407
3 жыл бұрын
PedroTech thanks will have a look. You got some great content. I'm gonna be busy for a while. 😀👍
@itscartmanbrah48563 жыл бұрын
Thank you for the tutorial man by the way what's the name of the color theme you're using ?
@PedroTechnologies
3 жыл бұрын
Glad you liked it! The theme is called palenight!
@saleemghanem2 жыл бұрын
@8:12 what is that homepage??
@anaezesomtochukwu38073 жыл бұрын
Can I use phpmyadmin MySQLdatabase ?
@PedroTechnologies
3 жыл бұрын
I think so, I like using mysqlworkbench but it should work with anything!
@usmanmughal59163 жыл бұрын
Awesome Video :)
@PedroTechnologies
3 жыл бұрын
Glad you enjoyed it!
@anaezesomtochukwu38073 жыл бұрын
Can this work with flutter (darts) apps?
@PedroTechnologies
3 жыл бұрын
Yes!
@abhishekrawat85793 жыл бұрын
keep doing Node and MySQL because i like this combination rather than mongodb and I think you too love to work with node and mysql❤️❤️❤️
@PedroTechnologies
3 жыл бұрын
I prefer it too hahaha thats why I used it in this video!
@abhishekrawat8579
3 жыл бұрын
@@PedroTechnologies glad to know ❤️❤️❤️
@criley7755
3 жыл бұрын
There are two types of people in the world... people who prefer non-relational databases, and people who've actually built a project for production :)
@PedroTechnologies
3 жыл бұрын
@@criley7755 Completely agree!
@yaseenimuhammadraja94612 жыл бұрын
Great explanation👍❤️👊. Can you give Source code pls?
@rangabharath42533 жыл бұрын
Awesome 👍
@PedroTechnologies
3 жыл бұрын
Thank you!
@hosseinramezani14283 жыл бұрын
excelent
@PedroTechnologies
3 жыл бұрын
Thank you!
@PanlasangMotour3 жыл бұрын
Node Js Express with passport js :)
@PedroTechnologies
3 жыл бұрын
Planning on making it soon!
@DanielDuhon5 ай бұрын
One comment just to help: the BOOLEAN type is a TINYINT, so it automatically changed it for you. Hope this helps!
Пікірлер: 81
I've been watching videos the whole day trying to understand the basics of express and connecting to database , and this one is truly the best one out there .
@PedroTechnologies
3 жыл бұрын
Great to hear! I am really happy you enjoyed it!
Good stuff! Just one thing - you skipped creating MySQL DB server but understandable if it would've taken a while to explain that as well. For those who have docker you can run the following 3 commands to run a mysql DB image: docker pull mysql docker network create my-net docker run -it --network my-net -p 3306:3306 --name mysql -e MYSQL_ROOT_PASSWORD=password -d mysql
@PedroTechnologies
3 жыл бұрын
Yes! I pinned you in case someone wants to know this. Tbh I was in doubt on if I should have shown the implementation of a DB or not due to time. I chose to do so at the end but it came with the cost of not explaining everything thoroughly. THank you for posting this!
@deetee2645
3 жыл бұрын
@@PedroTechnologies For sure! I added exact commands that can be ran
I can't believe I haven't ran into your videos, they are the best explanations out there.
Quick Tips: Dunno if someone already mentioned these but... 1) You can bypass having to press Enter for all the prompts/questions you're asked when you do "npm init", if you do "npm init -y" instead. The -y flag means "say yes to everything." 2) If the server your running is set up in the default file or the entry point (to check what the entry point is just look at the value assigned to the key "main" in your package.json file) you could just do "node ." . The dot at the end just means to run default file in the current directory. Great video by the way Pedro, learned a lot!
@sahilyadav3782
Жыл бұрын
Thanks a lot for the tips!
i found your channel yesterday and now i'm watching all your video one by one...
@PedroTechnologies
3 жыл бұрын
Hahaha Welcome! I am glad you are enjoying the videos!
Explanation is awesome, easy to understand. Thanks for the video.
@PedroTechnologies
3 жыл бұрын
Glad it was helpful!
Great tutorial! Really appreciate it🙏🏾Just subscribed and gonna check out more of your videos!😁
Really nice one. Simple and straight to the point
@PedroTechnologies
3 жыл бұрын
Thank you! Really appreciate!
This is the perfect introduction for building an API.
Trust me one of the BEST KZreadr, I am not getting why arent you in the spotlight? There isn't much resource about backend in youtube and you got them. Congrats
@PedroTechnologies
3 жыл бұрын
Hahaha thank you so much! I really appreciate the support!
@Rakibul-Hasan-Mahin
3 жыл бұрын
I would like to work on some kind of project with you one day. Best of luck with your future, you got any social media or sth??
Please create video on JWT authentication in NodeJS
@PedroTechnologies
3 жыл бұрын
Should make one soon!
First of all, thank you for this great tutorials, it's a wonderfull experience to see how you teach:). It would be awesome for us, your suscribers to see you teaching us building a rest api, with react, node, mysql and using multiple tables to the see the associations taking place like one to many, many to many..or Join (INNER, OUTER, LEFT, RIGHT, etc..) tables based on id. Thank you once more and keep the good work!
@PedroTechnologies
3 жыл бұрын
Thank you so much! I have been planning on a video on associations, just don't know when I will be able to post it! However it will be pretty soon!
Thank You Mr. Pedro Nice One !
Hey man, nice video for beginners! It would be awesome if you could make a video like this one, but using the intermediate folder structure for Express API'S that you showed on a previous video. I really want to know how a controller relates to a service, and so on.
@PedroTechnologies
3 жыл бұрын
Yes! I plan on making one! That project structure was based on the MVC model, so I should bring an MVC video any time soon!
hey pedro after useRef tutorial I came up with that it's very easy to work bhi dom manipulation in react... and before it I'm stuck in some point that how I work with document object. And after learning useRef hook. I can easily manipulate dom elements. Thanks buddy❤️🔥 And I watching this tutorial to learn more about rest api.
@PedroTechnologies
3 жыл бұрын
Awesome!! Really glad that you are watching the videos and learning from them!
Thanks for the video Pedro!!!
This channel is awesome.
@PedroTechnologies
3 жыл бұрын
I appreciate that!
Man what are the odds? I just wanted to learn Restful API and here you are. I was so confused about the "stateless" in Restful and I searched online that using Json Web Token(JWT) for authentication is a stateless operation. I just followed your previous video about it but is that a Restful stateless example? Thank you Pedro for the tutorials!
@PedroTechnologies
3 жыл бұрын
Awesome! By stateless it menas that the backend shouldn't keep track of the state of the client. Meaning that if a user signs in with a JWT, then the client has to store the token. THe server must receive the token from the client and validate it.
That's a very good tutorial. Good error handling.
@PedroTechnologies
3 жыл бұрын
Glad you liked it!
I love your tutorials
Thank you so much, really appreciate it :)
Thank you so much for the video ..the explanation is very clear
Thank you for the tutorial! 😊 Pedro, 2 weeks ago you saved my university project with your React-Node CRUD tutorial. So thank you for that, too! I have a question. I would like to make an image gallery CRUD with image files and data like the picture's name, description, date etc. ) And I would like to make it with React, Node.Js (express) and mySQL, but I don't really find a tutorial with this combination. Maybe can I ask you to make a video about an image CRUD like this? If so, I would be the first one to watch it. Also I recommended your tutorials to my classmates and friends! 😊 (you explain better than some of my teachers haha)
@PedroTechnologies
3 жыл бұрын
I have a video on images in react! I use cloudinary! Here is the link: kzread.info/dash/bejne/i2GKycOLp7q5Y9I.html . THank you for recommending the channel! Really appreciate it!
@alanwalker5845
3 жыл бұрын
omg which university is it that teachs React and Node.js?
@brystyle
3 жыл бұрын
@@alanwalker5845Eszterházy Károly University in Hungary :P Unfortunately we just got a little insight in React. Then we had to learn from the net and make the projects by ourselves...
Thanks for this Excellent tutorial dude!
@PedroTechnologies
3 жыл бұрын
Glad it was helpful!
Great Tutorial
i love your tutorials
@PedroTechnologies
3 жыл бұрын
Thank you! Really glad you like them!
great tutorial man! Love you
@PedroTechnologies
3 жыл бұрын
Glad you enjoyed! Thakn you for the support!
your video is very good and explanation is very clear... so please continue making video on MERN Stack and also React js with firebase auth and database...
@PedroTechnologies
3 жыл бұрын
Thank you! I plan on more MERN videos!
@ashoklrawat2287
3 жыл бұрын
@@PedroTechnologies thank u brother... And can you please make a video on how to implement quill js or draft js rich test editor in react with making a full blog web app... Because now I'm totally depend on your channel, to learn and become MERN STACK developer , you explain everything in a very simple way... Your are very good in teaching and explaining ..❤️❤️👍👍 thank you again brother for making videos for us.. thank
Well this is dope!
Thanks, a really good video tutorial!
This is an amazing video! Thank you
33:00 couldn't you of used the npm package uuid then added some logic to the post request and put request? like const newUser = req.body then do if newUser._id === " " then you would just do newUser._id = uuidv4() which would auto generate you a id if the key: value is empty. You could of also added more logic for if the !newUser._id meaning if there isn't a _id in the request then you could throw an error saying add the _id key with an empy value string to have it auto generate.
Great tutorial thanks. Subscribed. 👍 how do you get the purple on VS code by the way?
@PedroTechnologies
3 жыл бұрын
Thank you! I use a theme called "Palenight Theme"
@adante407
3 жыл бұрын
PedroTech thanks will have a look. You got some great content. I'm gonna be busy for a while. 😀👍
Thank you for the tutorial man by the way what's the name of the color theme you're using ?
@PedroTechnologies
3 жыл бұрын
Glad you liked it! The theme is called palenight!
@8:12 what is that homepage??
Can I use phpmyadmin MySQLdatabase ?
@PedroTechnologies
3 жыл бұрын
I think so, I like using mysqlworkbench but it should work with anything!
Awesome Video :)
@PedroTechnologies
3 жыл бұрын
Glad you enjoyed it!
Can this work with flutter (darts) apps?
@PedroTechnologies
3 жыл бұрын
Yes!
keep doing Node and MySQL because i like this combination rather than mongodb and I think you too love to work with node and mysql❤️❤️❤️
@PedroTechnologies
3 жыл бұрын
I prefer it too hahaha thats why I used it in this video!
@abhishekrawat8579
3 жыл бұрын
@@PedroTechnologies glad to know ❤️❤️❤️
@criley7755
3 жыл бұрын
There are two types of people in the world... people who prefer non-relational databases, and people who've actually built a project for production :)
@PedroTechnologies
3 жыл бұрын
@@criley7755 Completely agree!
Great explanation👍❤️👊. Can you give Source code pls?
Awesome 👍
@PedroTechnologies
3 жыл бұрын
Thank you!
excelent
@PedroTechnologies
3 жыл бұрын
Thank you!
Node Js Express with passport js :)
@PedroTechnologies
3 жыл бұрын
Planning on making it soon!
One comment just to help: the BOOLEAN type is a TINYINT, so it automatically changed it for you. Hope this helps!