Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Nested routes #99

Closed
mjmnagy opened this issue May 7, 2019 · 0 comments
Closed

Nested routes #99

mjmnagy opened this issue May 7, 2019 · 0 comments

Comments

@mjmnagy
Copy link

mjmnagy commented May 7, 2019

Hi,

I am having a problem with nested routes

Currently i have the following dir

routes (main directory for all routes)

  • v1
    • me
      • index.js
    • groups
      • index.js
      • payments.js
  • v2
    -- same as above (ish)

i set up enrouten like so

const app = express();

app.use([
  enrouten({
      directory: 'routes',
      routerOptions: {
           caseSensitive: true
      }
  })
])

I get results for
localhost:4000/v1/me/
localhost:4000/v1/groups/

but i do not get anything from
localhost:4000/v1/groups/payments //-> Or anything within payments.js

//routes/v1/groups/payments.js

'use strict';

 module.exports = function(router) {
      router.get('*', function(req, res) {
           res.send('dog'); // Request continually loads
      });
 };
  1. Is there a limit to how many nested routes enrouten can handle?
  2. If there is what is the limit and where can i find the documentation?
  3. If there is not a limit, what would cause my payments.js route to hang?

Thanks in advance!!

@mjmnagy mjmnagy closed this as completed May 7, 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

No branches or pull requests

1 participant