-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
feat(core): add path
property to modules
#297
Conversation
Some apps may quickly become very large, and the current nest architecture does not allow much room to scale. This commit adds a `path` property on module metadata. This way, one can maintain good modular structure without worrying about maintaining the right nested paths. It takes advantage of the path package in Node.JS to concatenate paths without worrying about slashes (this may need to be changed or standardized in the future, by checking for slashes in the first or last position of the string). This is a MINOR VERSION change, and should not be merged until the next minor is about to release. Fixes #255
@coveralls you are mean because nobody cares about that ten-thousandth of a percent. Nobody. |
You made it 😀 🎉 |
Hahaha I did... now just to convince Kamil to merge 😄 |
@coveralls are you satisfied now ? |
Hi @wbhob, |
If there’s only one use case, people that don’t need it could just not use it... |
However there needs to be some solution. It’s not DRY to paste 5- or 6-level deep URLs into each controller. |
|
Actually , I think I made something like RouterModule , take a look here but It was depend on having access to Nest Container , but I will Refactor it to make it stand-alone. |
@shekohex I need to update the docs with |
For now you can take a look into nestjs/graphql module |
|
Yeah, if that functionality exists that may even be a lot better than my implementation. Gotta think about enterprise! |
You’ll also notice my implementation is not dependent on having a path set at all, and it only applies to controllers. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Some apps may quickly become very large, and the current nest architecture does not allow much room
to scale. This commit adds a
path
property on module metadata. This way, one can maintain goodmodular structure without worrying about maintaining the right nested paths. It takes advantage of
the path package in Node.JS to concatenate paths without worrying about slashes (this may need to be
changed or standardized in the future, by checking for slashes in the first or last position of the
string). This is a MINOR VERSION change, and should not be merged until the next minor is about to
release.
Fixes #255