Setup SES on per module basis?


How can I setup SES on a per module basis? Basically I have a few
modules in my app and typically I've setup SES in the ColdBox.cfc
config component but I'm trying to find out if there is a way to do
this just at the module level. If so how?

Do I just add something like this to the ModuleConfig.cfc?




All in the docs:

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


I was able to get my module to use SES routing, but only by calling
setEnabled(true) in the parent's "routes.cfm" file. I only want SES
routing for one of my modules and turning this setting to true in
Routes.cfm seems to cause my other modules to use SES routing also

I must be missing something...

From what I recall from modules class that would be expected. You would have to separate your apps into different coldboxes.

Make sure the this.entryPoint in your module config is factory. That’s it.

Hi Lius,

Thank you for the fast response.I really appreciate it.

I tried it but still I have to use module name inside my url to get to the files in modules.

I have added something like this:

<cfset addModuleRoutes(pattern="/factoires/:factoryname", module=“factory”)>

function PathInfoProvider(Event) { var rc = Event.getCollection(); var prc = Event.getCollection(private=true);


// if we have a subdomain, its a factory site
local.servername = cgi.server_name;
local.servername = replacenocase(local.servername, “”, “”);
local.servername = replacenocase(local.servername, “www.”, “”);
local.servername = replacenocase(local.servername, “.local”, “”);
local.servername = replacenocase(local.servername, “.”, “”);
if(len(trim(local.servername)) and local.servername neq “staging” and local.servername neq “www”)
local.URI = “/factories/” & local.servername;

return local.URI;

This will get me to the default layout of the module together with the routes in ModuleConfig.cfc i.e

// SES Routes
routes = [
// Module Entry Point
{pattern="/", handler=“main”,action=“index”},
// Convention Route

After this what happens is I am only getting the main.index for every other events inside the modules.