Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request an example with @nrwl/nest in the monorepo #106

Open
sketchnotes opened this issue Jun 30, 2020 · 0 comments
Open

Request an example with @nrwl/nest in the monorepo #106

sketchnotes opened this issue Jun 30, 2020 · 0 comments

Comments

@sketchnotes
Copy link

At the moment, there's no clean example that could help build a scalable application in the monorepo with @nrwl/nest as backend. Many sources provide quite limited information and it breaks once the API grows. There are some challenges:

  1. with nestjs all Entites are combined with relative path __dirname + '/../*/.entity{.ts,.js}' and it's not possible in the monorepo, as soon as it breaks the border of the module => Error: 'Cannon use import statement outside a module';

  2. every Entity should be directly imported in the different modules and it creates quickly A circular dependency between modules;

  3. to avoid A circular dependency that throws an unresolved error, all entities should be kept in one big module;

  4. classes, imported from the different modules, don't always properly instantiated in the decorators.

I created some repo with the mentioned challenges:

1 - 2: https://github.com/sketchnotes/nx-nestjs

3 - 4: https://github.com/sketchnotes/nx-nestjs-JwtAuthGuard/

Imho, I want to believe that it would be nice to have an easy but scalable example, something like auth-users-posts-comments with all dungeons of @NxDevTools & @nestframework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant