Answer the question
In order to leave comments, you need to log in
What's the point of NestJS modules?
Started learning NestJS and got a bit carried away with module assignments.
Even the documentation only says
A module is a class marked with the Module decorator
Answer the question
In order to leave comments, you need to log in
This decorator essentially describes what modules the current module depends on, what controllers and services it has - that is, roughly speaking, a description of the module or something, its configuration. And the module itself is a collection of some kind of logic (services, controllers), united in meaning (located in the same folder). That something like applications in Django inside the project, if you dealt with this. This is necessary so that the project does not turn into a mess. So in your case, users and products are two different modules.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question