Add controller prefix option
Closed this issue · 2 comments
AnandChowdhary commented
Would be cool if we could have a global prefix added to all controllers, like this:
this.app.setPrefix("v1/");
super.addControllers([new UsersController()];
Then, the routes can be generated as /v1/users
instead of /users
, which can be used for versioning, or having a global /api
prefix, etc.
seanpmaxwell commented
Why not just add create a root level parent controller and add v1 to that?
AnandChowdhary commented
I didn't realize that existed, thanks!