ColdBox Relax - Features

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 :slight_smile:

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

Thanks Nolan,

Can you add them here: https://github.com/coldbox/coldbox-relax/issues

So I can keep track of them for the next release.

Thanks

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com