11<snippet >
22<content ><![CDATA[
33/**
4- * ColdBox Configuration File
5- */
4+ * ColdBox Configuration File
5+ */
66component{
77
8- // Configure ColdBox Application
8+ /**
9+ * Configure the ColdBox Application
10+ */
911 function configure(){
1012
1113 // coldbox directives
1214 coldbox = {
13- //Application Setup
14- appName = "${1:Your App Name}",
15- eventName = "event",
16-
17- //Development Settings
15+ // Application Setup
16+ appName = getSystemSetting( "APPNAME", "${1:Your App Name}" ),
17+
18+ // Development Settings
1819 reinitPassword = "",
1920 handlersIndexAutoReload = true,
2021
21- //Implicit Events
22- defaultEvent = "Main.index ",
22+ // Implicit Events
23+ defaultEvent = "",
2324 requestStartHandler = "Main.onRequestStart",
2425 requestEndHandler = "",
2526 applicationStartHandler = "Main.onAppInit",
@@ -28,27 +29,28 @@ component{
2829 sessionEndHandler = "",
2930 missingTemplateHandler = "",
3031
31- //Extension Points
32- applicationHelper = "includes/helpers/ApplicationHelper.cfm",
33- ViewsHelper = "",
34- coldboxExtensionsLocation = "",
32+ // Extension Points
33+ applicationHelper = "includes/helpers/ApplicationHelper.cfm",
34+ viewsHelper = "",
3535 modulesExternalLocation = [],
36- pluginsExternalLocation = "",
3736 viewsExternalLocation = "",
3837 layoutsExternalLocation = "",
3938 handlersExternalLocation = "",
4039 requestContextDecorator = "",
41- controllerDecorator = "",
40+ controllerDecorator = "",
4241
43- //Error/Exception Handling
44- exceptionHandler = "",
45- onInvalidEvent = "",
46- customErrorTemplate = "",
42+ // Error/Exception Handling
43+ invalidHTTPMethodHandler = "",
44+ exceptionHandler = "main.onException",
45+ invalidEventHandler = "",
46+ customErrorTemplate = "",
4747
48- //Application Aspects
48+ // Application Aspects
4949 handlerCaching = false,
5050 eventCaching = false,
51- viewCaching = false
51+ viewCaching = false,
52+ // Will automatically do a mapDirectory() on your `models` for you.
53+ autoMapModels = true
5254 };
5355
5456 // custom settings
@@ -65,8 +67,6 @@ component{
6567
6668 // Module Directives
6769 modules = {
68- //Turn to false in production
69- autoReload = false,
7070 // An array of modules names to load, empty means all of them
7171 include = [],
7272 // An array of modules names to NOT load, empty means none
@@ -85,68 +85,54 @@ component{
8585 info = [ "coldbox.system" ]
8686 };
8787
88- // Layout Settings
88+ / Layout Settings
8989 layoutSettings = {
90- defaultLayout = "Main.cfm ",
90+ defaultLayout = "",
9191 defaultView = ""
9292 };
9393
94- //Interceptor Settings
94+ // Interceptor Settings
9595 interceptorSettings = {
96- throwOnInvalidStates = false,
9796 customInterceptionPoints = ""
9897 };
9998
100- //Register interceptors as an array, we need order
99+ // Register interceptors as an array, we need order
101100 interceptors = [
102- //SES
103- {
104- class="coldbox.system.interceptors.SES"
105- }
106101 ];
107102
108- /*
109- // flash scope configuration
110- flash = {
111- scope = "session,client,cluster,ColdboxCache,or full path",
112- properties = {}, // constructor properties for the flash scope implementation
113- inflateToRC = true, // automatically inflate flash data into the RC scope
114- inflateToPRC = false, // automatically inflate flash data into the PRC scope
115- autoPurge = true, // automatically purge flash data for you
116- autoSave = true // automatically save flash scopes at end of a request and on relocations.
117- };
103+ // Module Settings
104+ moduleSettings = {
118105
119- //Register Layouts
120- layouts = [
121- { name = "login",
122- file = "Layout.tester.cfm",
123- views = "vwLogin,test",
124- folders = "tags,pdf/single"
125- }
126- ];
127-
128- //Conventions
129- conventions = {
130- handlersLocation = "handlers",
131- pluginsLocation = "plugins",
132- viewsLocation = "views",
133- layoutsLocation = "layouts",
134- modelsLocation = "model",
135- eventAction = "index"
136106 };
137107
138- //Datasources
139- datasources = {
140- mysite = {name="mySite", dbType="mysql", username="root", password="pass"},
141- blog_dsn = {name="myBlog", dbType="oracle", username="root", password="pass"}
142- };
108+ /*
109+ // flash scope configuration
110+ flash = {
111+ scope = "session,client,cluster,ColdboxCache,or full path",
112+ properties = {}, // constructor properties for the flash scope implementation
113+ inflateToRC = true, // automatically inflate flash data into the RC scope
114+ inflateToPRC = false, // automatically inflate flash data into the PRC scope
115+ autoPurge = true, // automatically purge flash data for you
116+ autoSave = true // automatically save flash scopes at end of a request and on relocations.
117+ };
118+
119+ //Conventions
120+ conventions = {
121+ handlersLocation = "handlers",
122+ pluginsLocation = "plugins",
123+ viewsLocation = "views",
124+ layoutsLocation = "layouts",
125+ modelsLocation = "model",
126+ eventAction = "index"
127+ };
128+
143129 */
144130
145131 }
146132
147133 /**
148- * Dev environment
149- */
134+ * Dev environment
135+ */
150136 function development(){
151137 coldbox.customErrorTemplate = "/coldbox/system/includes/BugReport.cfm";
152138 }
0 commit comments