Hello! Hopefully you found this video useful. As usual all the code in this video is available on my GitHub (link in the description). If you have any issues or suggestions for future videos let me know in the comments 😀
Bro, these two are the best Node.js tutorial with TypeScript and OOP that I've found on RUclips after watching thousands. Please continue your work keep it up bro!! Good luck!
For a beginner, your code and the way you explain, both are very easy to understand! After browsing so many videos on RUclips, I finally found your channel and videos. I really love to see future videos on front end react in typescript connecting to this backend.. :D
Thanks for this amazing tutorial parts (#1 & #2) and I would definitely recommend it to anyone who’s looking for a boilerplate to struct an express application using TypeScript
I was looking for a tutorial for node and typescript and this is the best I could find. Thank you for your explanations and good luck with your youtube channel.
It is a well structured, detailed video about Typescript. It helps me a lot. Brother kindly, if you enlighten about the product list, update and delete the product with image upload (normal or S3) , it will be very beneficial. Waiting for your valuable response.
Awesome explanation and very useful tutorials. I really want to know how to interact with two models using this structured project and how does array type in model will implement using interface. Waiting for the next part.
Hi, thank you for the compliments :) I'll make a note of your suggestions, as I go through this tutorial series and expand upon the API I think I'll end up using multiple models in services and adding arrays to interfaces so your questions should get answered in future videos :D
Hello, very good work. This OOP style helps me a lot to undestand! I have one question though. Why u add res.user = user on authenticated.middleware and not user.service in the register and login function. I mean that this expression will only run when make a call to '/' route. Isn't better to add on login and register methods?
Hi, glad this video is helping you! The reason we add it on the middleware is because we then have the user available on every request that uses the authenticated middleware. If we only did it on the register/login methods we would assign res.user but it would only be available on requests to register/login routes.
Hi, thanks for great tutorial. I have a question authenticated middleware doesnt work on all routes, i tried putting it in other routes and somewhere its not working and somewhere works
Hi, I'm not aware of any particular design pattern I'm using here, I think the closest would be "Three-tier architecture". I usually just lay out the project in a way that makes sense and go from there. This blog post may help you out though if you're looking for some more reading - dev.to/santypk4/bulletproof-node-js-project-architecture-4epf - it's part of the inspiration for the api we're building in this series but it goes into more detail on some more topics that I might not end up covering. Hope this helps! :)
hello... bearer.startsWith() or split() is showing an error(does not exist on type string[].. ts(2339)) tried to resolve but cannot find answer can you solve...
if anyone will have the same problem you guys need to do bearer.split(" ")[1] beucase in request.header.authorization it is something like that: Bearer [spacebar] token so you split this by empty string with spacebar and then your second argument i mean [1] will be the token :)
hey bro, regarding to the decorator folder in definitions => custom.d.ts i did the same what you did and when i try to write unit tests for authenticated middleware im getting error that property 'user' doesnt exist on type Request any idea how to cope with that?
Hello! Hopefully you found this video useful. As usual all the code in this video is available on my GitHub (link in the description). If you have any issues or suggestions for future videos let me know in the comments 😀
😁please add swagger-ui in this project. thank your for the great tutorial, i have learnt many things from this project.
Bro, these two are the best Node.js tutorial with TypeScript and OOP that I've found on RUclips after watching thousands. Please continue your work keep it up bro!! Good luck!
brilliant demonstration of OOP approach in terms of express js. just brilliant
For a beginner, your code and the way you explain, both are very easy to understand! After browsing so many videos on RUclips, I finally found your channel and videos. I really love to see future videos on front end react in typescript connecting to this backend.. :D
Thanks for this amazing tutorial parts (#1 & #2) and I would definitely recommend it to anyone who’s looking for a boilerplate to struct an express application using TypeScript
Thank you, glad you found it useful 😀
I wish you added unit tests here would be so cool
I was looking for a tutorial for node and typescript and this is the best I could find. Thank you for your explanations and good luck with your youtube channel.
Nicely explained and the file structure and code splitting is awesome. Thank you so much for the series.
Your videos are really useful, can you upload more? Thank you, sir.
Really insightful tutorial. Will definitely apply this in my next project. Looking forward to more of your content.
It is a well structured, detailed video about Typescript. It helps me a lot. Brother kindly, if you enlighten about the product list, update and delete the product with image upload (normal or S3) , it will be very beneficial. Waiting for your valuable response.
Both videos are awesome. tyvm
Love the video. If you want to I would love a video on implementing tests.
Awesome explanation and very useful tutorials. I really want to know how to interact with two models using this structured project and how does array type in model will implement using interface. Waiting for the next part.
Hi, thank you for the compliments :) I'll make a note of your suggestions, as I go through this tutorial series and expand upon the API I think I'll end up using multiple models in services and adding arrays to interfaces so your questions should get answered in future videos :D
Excellent tuto. I would like that you show how to implement Dependency Injection Service -> Controller and Resfresh Token. Thanks so much!
Thank you, dependency injection is definitely something I'd like to do in the future!
for anyone haveing the catch errors, just set "useUnknownInCatchVariables": false, in your ts.config file..
thanks Rettson
Why no more extension im waiting for another episode
NIce videos .. How to upload pictures from Node Typescript using cloudinary
Awesome.
Can you make unit and integration testing using jest for this project.
Wow, thank you so much for this tutorial. I just completed this video and the first one and truly, I have learned a lot. A very special thanks to you🙂
Hello, very good work. This OOP style helps me a lot to undestand!
I have one question though.
Why u add res.user = user on authenticated.middleware and not user.service in the register and login function.
I mean that this expression will only run when make a call to '/' route.
Isn't better to add on login and register methods?
Hi, glad this video is helping you! The reason we add it on the middleware is because we then have the user available on every request that uses the authenticated middleware. If we only did it on the register/login methods we would assign res.user but it would only be available on requests to register/login routes.
Hey man great video, I have a question... Do these apis follow rest standards?
Please add a video for Google based authentication as well.
Hi, thanks for great tutorial. I have a question authenticated middleware doesnt work on all routes, i tried putting it in other routes and somewhere its not working and somewhere works
Hi, how do i return a customised json error if the route is not found?
Hello.... I want to ask a question, what kind of design pattern are you using so I can study more on it
Hi, I'm not aware of any particular design pattern I'm using here, I think the closest would be "Three-tier architecture". I usually just lay out the project in a way that makes sense and go from there. This blog post may help you out though if you're looking for some more reading - dev.to/santypk4/bulletproof-node-js-project-architecture-4epf - it's part of the inspiration for the api we're building in this series but it goes into more detail on some more topics that I might not end up covering. Hope this helps! :)
hello... bearer.startsWith() or split() is showing an error(does not exist on type string[].. ts(2339)) tried to resolve but cannot find answer can you solve...
I think the problem is in bearer.split(“Bearer: “) should be bearer.split(“Bearer “)
if anyone will have the same problem you guys need to do bearer.split(" ")[1] beucase in request.header.authorization it is something like that: Bearer [spacebar] token so you split this by empty string with spacebar and then your second argument i mean [1] will be the token :)
hey bro, regarding to the decorator folder in definitions => custom.d.ts i did the same what you did and when i try to write unit tests for authenticated middleware im getting error that property 'user' doesnt exist on type Request any idea how to cope with that?