trailsjs / trailpack-router

:package: Router. Aggregate and Configure Application Routes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Route format

jaumard opened this issue · comments

I have some difficulties to understand what this module do exactly.
This trailpack have to format route to specific web server format ?
For example route look like /api/v1/{modelName}, maybe it's working for hapi but not for express4 who use /api/v1/:modelName.
Does trailpack-express4 need to do the translation or trailpack-router do it for me ?

Hey @jaumard do you still need help with this?

Hum yes please :)
For now trailpack-express4 is working but I parse routes and translate /api/v1/{modelName} into /api/v1/:modelName manually. Just want to know if it's ok like this or if trailpack-router will do this job for me one day.
If it's ok like I did I can close this issue :)

I parse routes and translate /api/v1/{modelName} into /api/v1/:modelName manually

I think that's fine, unless there's a plugin for express that can read hapi routes. I'll close for now; we can re-open if we find a better way to do this.