#Monorepo issue with NestJS

17 messages · Page 1 of 1 (latest)

reef kite
#

So, are you trying to mix Nest's monorepo mode with an npm workspace setup?

halcyon furnace
#

Yes, excatly!

reef kite
#

Yeah, that won't work AFAIK.

halcyon furnace
#

Should i do this? I want in my npm workspace setup a nestjs microservice "infrastucture"

reef kite
#

You either do the one, or the other.

halcyon furnace
#

Okay, so i should have the frontend in its own repo

reef kite
#

There is no such thing as a "Nestjs microservice infrastructure".

halcyon furnace
#

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

reef kite
halcyon furnace
#

Okay!

#

Thanks!

#

I will create my nestjs monorepo and add there my frontend as a package

reef kite
#

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.

reef kite
#

And, although it means a bigger learning hurdle, you should invest in using a proper monorepo manager, like Nx or Rush.

halcyon furnace
#

Thanks for your help! 🙂 i will give it a look

halcyon furnace
#

Do you maybe have an example repository for that ? Do you know some maybe :)?