I hope the subject isn’t totally confusing.
In my Coldbox.cfc, I declared my three environments – local, dev and prod. I have three functions at the bottom named as such. The last line of each one, I added coldbox.dsn which is a copy of the line up in the datasources declaration. Obviously that’s the wrong syntax.
Example:
datasources = {
dsn = {name=“localdb”, dbType=“mysql”, username=“root”, password=“testing”}
};
// Local Environment
function local(){
if(structKeyExists(URL,‘fwreinit’))
ormReload();
//Override Settings
coldbox.debugmode=false;
coldbox.handlersIndexAutoReload = true;
coldbox.handlerCaching = false;
coldbox.eventCaching = false;
coldbox.reinitpassword = “”;
coldbox.debugpassword = “”;
wirebox.singletonreload = true;
modules.autoReload=true;
//Debugger Settings
debugger.showRCPanel = false;
//Custom Settings
coldbox.customErrorTemplate = “/coldbox/system/includes/BugReport.cfm”;
settings.show_debug=“true”;
coldbox.dsn = {name=“localdb”, dbType=“mysql”, username=“root”, password=“testing”};
So, what IS the correct way to do this?
Thanks!
Rob