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

Concatenated routes #664

Closed
menme95 opened this issue May 10, 2018 · 3 comments
Closed

Concatenated routes #664

menme95 opened this issue May 10, 2018 · 3 comments

Comments

@menme95
Copy link

menme95 commented May 10, 2018

I'm submitting a...


[ ] Regression 
[ ] Bug report
[X ] Feature request
[ ] Documentation issue or request
[ ] Support request

Current behavior

If you import a module inside other module, the controller's routes aren't concatenated.

Expected behavior

I mean, If a have a controller: @controller("animals") in my module animals, and I import a module cats with @controller("cats"), I think that cats route should be: /animals/cats

Environment

[System Information]

NodeJS Version : v10.0.0
NPM Version : 6.0.0


Nest version: 
microservices version : 5.0.0-beta.6
websockets version    : 5.0.0-beta.6
mongoose version      : 3.0.1
swagger version       : 1.2.2
testing version       : 5.0.0-beta.6
common version        : 5.0.0-beta.6
core version          : 5.0.0-beta.6
 
For Tooling issues:
- Node version: XX  10.0.0
- Platform:  OS Version     : Windows 7

@shekohex
Copy link
Contributor

Hay @menme95

actually your question was asked some time ago but in another format, and it was along discussion you could check it out here #255 , and my comment here #255 (comment) which is the same as your issue.

but as kamil decided to not doing so in the core of the framework, and we need to support this through 3rd party modules, so I created nest-router a little module that will help you to organize your Routes and it Will give you the ability to create a routes tree.
you should have a look at README file, and the examples folder.

@kamilmysliwiec
Copy link
Member

As @shekohex mentioned, use nest-router: https://github.com/shekohex/nest-router

@lock
Copy link

lock bot commented Sep 25, 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 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants