Skip to content

Conversation

@shekohex
Copy link
Contributor

This PR will make it easy to add a Path Property to a Module without even editing the Public API of Nest.
the Idea, anyone needs to make a Routes Tree will use an external package nest-router.
this package is well tested and Documented.
this PR will close #255 .

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 94.608% when pulling 8ae0a43 on shekohex:nest-router into 1812567 on nestjs:master.

@kamilmysliwiec
Copy link
Member

hi @shekohex,
I really enjoy the idea behind nest-router, it's really cool stuff, but as I said a few times already, there's no place for path in @Module() decorator.

@shekohex
Copy link
Contributor Author

shekohex commented Feb 4, 2018

Hi @kamilmysliwiec , Who said that we will have the path property in @Module() decorator,
there is no need to do this, and also there is no Public API will provide this.
all we need the ability to read only the path metadata from the module metatype if it exist ,which the nest-router will provide.
any one needs to make the routes tree , will only needs the nest-router package, that's it,
the RouterModule will provide the path property and write it to Module metatype.
at the end, this PR changes will be only used if the RouterModule used.

@kamilmysliwiec
Copy link
Member

Alright, I'm sorry @shekohex, 40 hours without sleep is definitely too much

@kamilmysliwiec
Copy link
Member

I'll review as soon as possible :)

@kamilmysliwiec kamilmysliwiec merged commit 8ae0a43 into nestjs:master Feb 5, 2018
@kamilmysliwiec
Copy link
Member

Cool stuff @shekohex, merged. Looking forward to nest-router. Btw, I think that importing RouterModule.forRoutes() instead of calling it in the constructor will be better 🙂

@shekohex
Copy link
Contributor Author

shekohex commented Feb 5, 2018

I will 👍 , Thanks.

@shekohex shekohex deleted the nest-router branch February 5, 2018 12:20
@shekohex
Copy link
Contributor Author

shekohex commented Feb 5, 2018

this package is now ready to be used nest-router, I'd love to add it in docs in RECIPES section

@kamilmysliwiec
Copy link
Member

@shekohex looking forward to it!! feel free to create PR, will merge as quickly as possible 🎉

@shekohex
Copy link
Contributor Author

shekohex commented Feb 5, 2018

Hi @kamilmysliwiec , I Just Finished the docs about This Module , and created the PR nestjs/docs.nestjs.com#45

@thaoula
Copy link

thaoula commented Apr 23, 2018

Hey guys,

Is this working in V5?
nestjsx/nest-router#8

Regards,
Tarek

@lock
Copy link

lock bot commented Sep 24, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global prefix for a module / route tree

4 participants