Default Route Execution
By now, we should all know the default SES route ColdBox offers: addRoute(":handler/:action?"). This means that we can target a handler with or without a package and an action for execution. In ColdBox we have also added a package resolver that will detect this pattern for module and package directories so we can do URL safe and SES friendly URLs for these executions by convention.
If we do not have this feature, this is how the URLs would look like:
1
http://mysite.com/module:handler/action
2
or
3
http://mysite.com/module:package.handler/action
Copied!
However, thanks to package resolving in the SES interceptor we can do links like this:
1
http://mysite.com/module/handler/action
2
or
3
http://mysite.com/module/package/handler/action
Copied!
Much better and nicer huh? Of course! So potentially, with one route we could write entire applications.
Last modified 1yr ago
Copy link
Edit on GitHub