Great Content Michael..!! I'm experienced enterprise app dev and mostly worked on well designed Java/.Net systems where proper design is very important as system should be extensible and maintained for long term. Recently I have been looking around NodeJS ecosystem for my side projects. I settled for NestJS for it's well thought out extensible architecture. The best thing about your videos is unlike many other videos explaining how to implement something ur videos also explain how to implement something "properly" in well throughout manner. You definitely deserve lot more subscribers..!!
Been waiting for a comprehensive typeorm 0.3x migrations tutorial with env variables for very long. I am greatful, thank you so much. Looking forward to more NestJs content.
Wow, this helped me to understand the basic concept of backend and the course even shows how to setup basic test. This course was really helpful building the base knowledge for starting backend programming. Thanks
Thank you, very grateful to see your NestJS videos. Would you ever think about a video tutorial of creating a polyrepo microservices project with NestJS and also a common library as a submodule in it?
Hey Michael, is there a specific reason to use Entity Managers to save instead of repositories? For example, using the ItemRepository to create and save an item at 19:20 instead of the Entity Manager. And if the former (ItemRepository) approach works, can we then remove the constructor we created in the Item Entity? Thank you btw for the comprehensive video. I already purchased the MicroServices course since it was on discount but I'm trying to improve my fundamentals before diving in the course
@@mguayhad the same question, but a follow up how does entityManager work with multiple entities like how does it know entityManager.save(item), entityManager.save(user), feels weird that would be more type safe than using the repository for the respective entity besides that great video learned some cool techniques like the constructor in the entity and creating the abstract entity, just started learning nestjs 2 days been a hardcore express fan for a while
Has anyone got the problem that when the restApi is rerun (npm run start:dev) only the columns with string values from the databases are emptied? Just the strings and not the number. If someone have had that issue, please help me how you solved it.
Thank you so much, I tried Migrations with MSSQL but it does work, please if you can provide any assistance I will appreciate. It asks for a config.server property
Hello, great content. There is only one thing that I don't understand. In what situations should we employ the migration? For example, in your video you set all items as non public. But it can also be done with the API Request? Or is that wrong?
Migration are helpful when you want to seed the db with fresh data for the first time or when you migrate to new DB without losing critical data.. This should be done without the use of API as API are used for single transaction in most of the cases whereas migration will help you inject multiple custom SQL query directly to the db.
@@mguay Wow, amazing, happy to hear that, enjoying the series and love the way you teach. I got chance to learn new aspects of TypeScript which was impossible to find in other places.
@@mguay No problem :) I appreciate the video. I'm dreaming of working with NestJS and after this tutorial my understanding of things just got so much better :)
Hey, question. Are you sure that, you have to import all entities and add them one by one? Can you not just do it how you did for migrations?not sure if I explained myself correctly. Beside that, great content!
the best practice is to make a dto an actual class and no doubt about it, otherwise how are you going to document your api using the most popular tool, which is swagger, which literally allows you to pass only class-based types? also, how are you going to validate upcoming request body while interface is not a value and does not exist during runtime? there literally exist npm packages named CLASS-VALIDATOR and CLASS-TRANSFORMER for validating dto schema; but these are only helpers that make your code cleaner, what is actually more important is that you are trying to disrupt dto pattern because there are solid rules behind this principle that should be untouched and unchanged if any concerns, go and check out how it's done in other programming languages, preferably Java because NestJS was strongly inspired by Angular which was strongly inspired by Java but it's just an example, you can go for C#, Python, or whatever else
Great, up to date instruction. If you're following along and get an error during testing "cannot find module" I had to add a line to the jest section in package.json "moduleNameMapper": { "^src/(.*)$": "/$1"
Great content. However, you cannot continue to create migration by yourself as your entities grow with complex relationships. The typeorm generate command, gives error. Cannot open file, referring to the data source folder. Here’s my generate migration command npm run build && typeorm migration:generate -d ./src/typeorm.config.ts migrations/test anyone has the right command or facing similar issue ? @mguay
Also, I could not revert the migrations and get the database back to the state before the migrations. I ran the command but it didn't work. Anyone knows why this is the case?
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/
Great Content Michael..!! I'm experienced enterprise app dev and mostly worked on well designed Java/.Net systems where proper design is very important as system should be extensible and maintained for long term. Recently I have been looking around NodeJS ecosystem for my side projects. I settled for NestJS for it's well thought out extensible architecture. The best thing about your videos is unlike many other videos explaining how to implement something ur videos also explain how to implement something "properly" in well throughout manner. You definitely deserve lot more subscribers..!!
I've bought your course and I have to say - it's amazing. And now I want to deeply dive into typeORM.
Thanks so much
Man, I discovered nestjs a year ago, wasn't able to find a channel which provides Nestjs quality code.
Then there you are !
Thank you so much
A video that provided me with a perfect survival guide. Good job, thank you!
Been waiting for a comprehensive typeorm 0.3x migrations tutorial with env variables for very long. I am greatful, thank you so much. Looking forward to more NestJs content.
Hi Michel, very useful great videos from NesJS tutorials. Looking forward to more NestJs content.
This is the best content after a lot of search, thanks man for sharing your knowledge with others.
Wow, this helped me to understand the basic concept of backend and the course even shows how to setup basic test.
This course was really helpful building the base knowledge for starting backend programming. Thanks
Been waiting for this for so long!! Thank you
Thank you for this video tutorial I hope there will be more video tutorials in the future on Nest JS
Thank you, very grateful to see your NestJS videos. Would you ever think about a video tutorial of creating a polyrepo microservices project with NestJS and also a common library as a submodule in it?
Great job! I love how you explained subscribers! I really need it! T.Y.
keep uploading nest js advance videos ..best content
Great content thank you for explaining everything so clearly.
Muchas gracias mister michael, por el excelente tutorial....
you are great man !! thanks for \ your awesome videos , we would want more videos about monorepo project and how to deploy it
thank you, very good tutorial!
Thank you this was amazing keep going with more awsome videos
Hey Michael, is there a specific reason to use Entity Managers to save instead of repositories? For example, using the ItemRepository to create and save an item at 19:20 instead of the Entity Manager.
And if the former (ItemRepository) approach works, can we then remove the constructor we created in the Item Entity?
Thank you btw for the comprehensive video. I already purchased the MicroServices course since it was on discount but I'm trying to improve my fundamentals before diving in the course
You can use either, but the former provides us with a bit more type safety.
@@mguay Thanks for the response
@@mguayhad the same question, but a follow up how does entityManager work with multiple entities like how does it know entityManager.save(item), entityManager.save(user), feels weird that would be more type safe than using the repository for the respective entity
besides that great video learned some cool techniques like the constructor in the entity and creating the abstract entity, just started learning nestjs 2 days been a hardcore express fan for a while
awesome video, thank you
What's the best practice to manage migrations in using typeorm in microservices? Like how can you connect those relation that are separated
Thanks! Another great video! Would you ever consider making video on Keycloak integration with NestJS and front-end?
Sure!
Hi! How do you manage migrations in production? Do you have a pipeline that executes It and then run the deploy?
Please could you do tutorials explaining concepts like concurrency (locking) mechanisms i.e pessimistic & optimistic locking
Isn't typeorm has slow perfonmance in relational queries? How about some Query builders like kysely or perfonmant ORM like Drizzle?
Hi,
Thx for this video.
I have a question. Why do you use async keyword when you don’t have await keyword inside the body of your function ? Thx
it's redundant and can be omitted
I am learning so much. Don't know about you.
Mind blowing tutorial,btw migration can add seeding fake data like Laravel?
Would you consider using new stack like drizzle orm and zod in nestjs?👀
Will you make graphql and role based authentication on nestjs
Has anyone got the problem that when the restApi is rerun (npm run start:dev) only the columns with string values from the databases are emptied? Just the strings and not the number. If someone have had that issue, please help me how you solved it.
Great tutorial! Only advice would be to go a little slower haha - but thank you so much!
Can you please make a video using the ts-rest library? It looks awesome but there is no content on it! Thanks :)
Thank you so much, I tried Migrations with MSSQL but it does work, please if you can provide any assistance I will appreciate. It asks for a config.server property
Michal, have you investigated the possibility of creating tables with TypeORM in runtime?
Hello, great content. There is only one thing that I don't understand. In what situations should we employ the migration? For example, in your video you set all items as non public. But it can also be done with the API Request? Or is that wrong?
Migration are helpful when you want to seed the db with fresh data for the first time or when you migrate to new DB without losing critical data..
This should be done without the use of API as API are used for single transaction in most of the cases whereas migration will help you inject multiple custom SQL query directly to the db.
I am facing this error: Missing required argument: dataSource
thx for video
Wow, i thought you would update the microservice course but instead added here.
That’s next!
@@mguay Wow, amazing, happy to hear that, enjoying the series and love the way you teach. I got chance to learn new aspects of TypeScript which was impossible to find in other places.
No hablo inglés pero entendí perfectamente gracias
41:41
💙💙💙💙
Hi Michael. I like your videos but I found there aren't many jobs for nestjs...sad for it.
Thank
Merci !
Thank you so much for the support!
@@mguay No problem :) I appreciate the video. I'm dreaming of working with NestJS and after this tutorial my understanding of things just got so much better :)
nice =))))
Great video nicely explained, but I hate nest.js
How come? That’s a first for me :)
Hey, question. Are you sure that, you have to import all entities and add them one by one? Can you not just do it how you did for migrations?not sure if I explained myself correctly. Beside that, great content!
for best practice dto should be an interface not a class
the best practice is to make a dto an actual class and no doubt about it, otherwise how are you going to document your api using the most popular tool, which is swagger, which literally allows you to pass only class-based types? also, how are you going to validate upcoming request body while interface is not a value and does not exist during runtime? there literally exist npm packages named CLASS-VALIDATOR and CLASS-TRANSFORMER for validating dto schema; but these are only helpers that make your code cleaner, what is actually more important is that you are trying to disrupt dto pattern because there are solid rules behind this principle that should be untouched and unchanged
if any concerns, go and check out how it's done in other programming languages, preferably Java because NestJS was strongly inspired by Angular which was strongly inspired by Java but it's just an example, you can go for C#, Python, or whatever else
Great, up to date instruction. If you're following along and get an error during testing "cannot find module" I had to add a line to the jest section in package.json
"moduleNameMapper": {
"^src/(.*)$": "/$1"
Great content. However, you cannot continue to create migration by yourself as your entities grow with complex relationships. The typeorm generate command, gives error. Cannot open file, referring to the data source folder. Here’s my generate migration command npm run build && typeorm migration:generate -d ./src/typeorm.config.ts migrations/test anyone has the right command or facing similar issue ? @mguay
Also, I could not revert the migrations and get the database back to the state before the migrations. I ran the command but it didn't work. Anyone knows why this is the case?