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?
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.
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”)>
var rc = Event.getCollection();
var prc = Event.getCollection(private=true);
local.URI = CGI.PATH_INFO;
// if we have a subdomain, its a factory site
local.servername = cgi.server_name;
local.servername = replacenocase(local.servername, “factory.com”, “”);
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;
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
// Convention Route
After this what happens is I am only getting the main.index for every other events inside the modules.
AM I DOING SOMETHING WRONG HERE???