Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (27 sloc) 940 Bytes
component {
this.name = "bear";
request.dgmrRunningDirectory = getDirectoryFromPath( getCurrentTemplatePath() );
//The following code and its placement is a little odd. Its here to give developers the ability to download then run code to do the setup.
if ( fileExists( request.dgmrRunningDirectory & "settings.cfm" ) ) {
include "settings.cfm";
} else if ( structKeyExists( form, "makeSettings" ) ) {
include "saveSettings.cfm";
location( url="index.cfm?ormReload", addtoken=false );
} else {
include "setup.cfm";
abort;
}
this.ormEnabled = true;
this.ormSettings.useDBForMapping = false;
this.mappings[ "/ui" ] = request.dgmrRunningDirectory & "ui";
this.mappings[ "/services" ] = request.dgmrRunningDirectory & "services";
function onRequestStart() {
if ( structKeyExists( url, "ormReload" ) ) {
ormReload();
}
}
function onError( Exception, EventName ) {
writeOutput("<h2>bear error</h2>");
writeDump(arguments);
}
}