seanpmaxwell/overnight

Add controller prefix option

Closed this issue · 2 comments

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.

Why not just add create a root level parent controller and add v1 to that?

I didn't realize that existed, thanks!