#Monorepo issue with NestJS
17 messages · Page 1 of 1 (latest)
Yes, excatly!
Yeah, that won't work AFAIK.
Should i do this? I want in my npm workspace setup a nestjs microservice "infrastucture"
You either do the one, or the other.
Okay, so i should have the frontend in its own repo
There is no such thing as a "Nestjs microservice infrastructure".
Nono, what i mean is that i want nestjs microservices. To do that i have to change the structure of the nestjs to monorepo, right? Its in the nest-cli file.
i want this as a package in my npm workspace
No. You can have a monorepo with your frontend in it too. You just can't use Nest's monorepo mode in your npm workspace setup. At least I don't believe you can.
Okay!
Thanks!
I will create my nestjs monorepo and add there my frontend as a package
The NestJS monorepo mode has nothing to do with microservice architecture other than it allows you to have multiple applications in the same repository. But, you can also do that (and should) with a proper monorepo management software.
Again, you should have a monorepo with both your backend applications and your frontend applications in it and to do this, you should NOT use the NestJS monorepo mode.
And, although it means a bigger learning hurdle, you should invest in using a proper monorepo manager, like Nx or Rush.
Thanks for your help! 🙂 i will give it a look
Do you maybe have an example repository for that ? Do you know some maybe :)?