question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m submitting a…


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

The simple way to map routers in the NestJS

Expected behavior

The good behavior is a map many routers and the module responsible, example:

@Module({
    routers: [{
         path: '/other', 
         module:  OtherModule, 
         children: [{
              path: 'children', 
              module: ChildrenOtherModule
          }
       }],
    imports: [OtherModule],
    controllers: [AppController],
    providers: [AppService],
})
export class AppModule 
  • When I want to make a request GET in my backend on the specific module, I just use the path: [GET] http://api.com/other and the controller responsible in inside OtherModule will response

What is the motivation/use case for changing the behavior?

  • The Nestjs it’s incredible frameworks for NodeJs, it’s the best to NodeJS. But my application is booming, routers start to get confused

Environment



Nest version: 6.5.0

 
For Tooling issues:
Node version: 8.12.0
- Platform:  MacOs 10.14.5

Others:
* IntelliJ IDEA 2019.1.2 (Ultimate Edition)  Build #IU-191.7141.44, built on May 7, 2019

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
shekohexcommented, May 22, 2019

abracadabra 👻, nest-router tada 🎉 !

2reactions
kamilmysliwieccommented, May 22, 2019

@lhenriquegomescamilo we’ll provide it soon 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Routing system overview - Drupal
The routing system is responsible for matching paths to controllers, and you define those relations in routes. You can pass on additional ...
Read more >
Routing: Introduction - Next.js
Next.js has a built-in, opinionated, and file-system based Router. ... The router will automatically route files named index to the root of the...
Read more >
What is routing? | IP routing - Cloudflare
Network routing is the process of selecting a path across one or more networks. The principles of routing can apply to any type...
Read more >
Routing Tables and Routing Types (System Administration ...
A system that implements dynamic routing relies on routing protocols, such as RIP for IPv4 networks, and RIPng for IPv6 networks, to maintain...
Read more >
Routing table - Wikipedia
In computer networking, a routing table, or routing information base (RIB), is a data table stored in a router or a network host...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found