#What is the most idiomatic pattern/rule for which modules should be imported into the root module?

4 messages · Page 1 of 1 (latest)

craggy coyote
#

So.. I'm building a RESTful(ish) API w/ NestJS w/ a team of engineers and I just got done having an hour-long Slack discussion on this topic with us landing nowhere solid.

We have modules that have controllers and services, and we have other modules that just have services, that are imported and used by other modules, and even still we have modules that have controllers and services, of which one or more of that module's services are imported and used by some other module.

The NestJS docs aren't exactly clear to us as to which modules we should import into our AppModule and which we shouldn't, or even if it matters at all? Is there some kind of detriment to just importing all of our application modules into the AppModule? I mean, that's what the official nest-cli tool is doing anyway whenever we use nest generate module 🤷‍♂️

Does anyone have a definitive answer to this?

craggy coyote
#

What's the definition of a "feature" module? 🤔

craggy coyote
#

Um.. that's a link to Angular's UI platform? huh?

#

Are you saying, take Angular's "sentiment" here re: "feature modules", and apply it to modules in Nest?