aniftyco / kubit

Full stack web framework for Node.js
https://kubitjs.com/
MIT License
26 stars 2 forks source link

Support string imports for `Route#group()` #65

Open joshmanders opened 6 months ago

joshmanders commented 6 months ago

Sometimes it can become pretty unweildly having a bunch of Route.group(() => { ... }) in your routes, so we could make this a bit better by allowing you to pass a path string into the group method which will then tell Kubit to import that file and execute it in the context of the route group.

This could allow you to split things up

Route.group('./dashboard');
Route.group('./admin').domain('admin.example.com');