Hi Luis,
I took a look at the latest version of ColdBox Relax last night. Great work! I have one question and a feature request
Question.
When defining the endpoints in the Relax.cfc file I wasnât able to get my method security working properly, when trying to set the action.
Ideally I want my route to look like this,:
addRoute(pattern="/users/:userid/locations/",
handler=âLocationâ,
action={
POST = âcreateLocationâ,
GET = âgetUserLocationsâ
});
As it stands now, I wasnât able to get the auto generated route to look like this when defining the action in Relax.cfc. The auto generation kept putting quotes around the action like so:
addRoute(pattern="/users/:userid/locations/",
handler=âLocationâ,
action="{
POST = âcreateLocationâ,
GET = âgetUserLocationsâ
}");
Feature Request.
It would be amazing if you could set multiple Main entry points in the config file? i.e Local REST API, Staging API, Production API, which would enable developers to easily switch between testing multiple environments.
this.environments = {
Local = âhttp://local.myapi.com/â,
Staging = âhttp://staging.myapi.com/â,
Production = âhttp://www.myapi.com/â
}
This would be a great feature for both documentation purposes and ease of testing.
Keep up the great work!
Thanks.
Nolan