1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
- component {
- /**
- * Configure the ColdBox App For Production
- * https://coldbox.ortusbooks.com/getting-started/configuration
- */
- function configure(){
- /**
- * --------------------------------------------------------------------------
- * ColdBox Directives
- * --------------------------------------------------------------------------
- * Here you can configure ColdBox for operation. Remember tha these directives below
- * are for PRODUCTION. If you want different settings for other environments make sure
- * you create the appropriate functions and define the environment in your .env or
- * in the `environments` struct.
- */
- coldbox = {
- // Application Setup
- appName : getSystemSetting( "APPNAME", "Your app name here" ),
- eventName : "event",
- // Development Settings
- reinitPassword : "",
- reinitKey : "fwreinit",
- handlersIndexAutoReload : true,
- // Implicit Events
- defaultEvent : "",
- requestStartHandler : "Main.onRequestStart",
- requestEndHandler : "",
- applicationStartHandler : "Main.onAppInit",
- applicationEndHandler : "",
- sessionStartHandler : "",
- sessionEndHandler : "",
- missingTemplateHandler : "",
- // Extension Points
- applicationHelper : "includes/helpers/ApplicationHelper.cfm",
- viewsHelper : "",
- modulesExternalLocation : [],
- viewsExternalLocation : "",
- layoutsExternalLocation : "",
- handlersExternalLocation : "",
- requestContextDecorator : "",
- controllerDecorator : "",
- // Error/Exception Handling
- invalidHTTPMethodHandler : "",
- exceptionHandler : "main.onException",
- invalidEventHandler : "",
- customErrorTemplate : "",
- // Application Aspects
- handlerCaching : false,
- eventCaching : false,
- viewCaching : false,
- // Will automatically do a mapDirectory() on your `models` for you.
- autoMapModels : true,
- // Auto converts a json body payload into the RC
- jsonPayloadToRC : true
- };
- /**
- * --------------------------------------------------------------------------
- * Custom Settings
- * --------------------------------------------------------------------------
- */
- settings = {};
- /**
- * --------------------------------------------------------------------------
- * Environment Detection
- * --------------------------------------------------------------------------
- * By default we look in your `.env` file for an `environment` key, if not,
- * then we look into this structure or if you have a function called `detectEnvironment()`
- * If you use this setting, then each key is the name of the environment and the value is
- * the regex patterns to match against cgi.http_host.
- *
- * Uncomment to use, but make sure your .env ENVIRONMENT key is also removed.
- */
- // environments = { development : "localhost,^127\.0\.0\.1" };
- /**
- * --------------------------------------------------------------------------
- * Module Loading Directives
- * --------------------------------------------------------------------------
- */
- modules = {
- // An array of modules names to load, empty means all of them
- include : [],
- // An array of modules names to NOT load, empty means none
- exclude : []
- };
- /**
- * --------------------------------------------------------------------------
- * Application Logging (https://logbox.ortusbooks.com)
- * --------------------------------------------------------------------------
- * By Default we log to the console, but you can add many appenders or destinations to log to.
- * You can also choose the logging level of the root logger, or even the actual appender.
- */
- logBox = {
- // Define Appenders
- appenders : { coldboxTracer : { class : "coldbox.system.logging.appenders.ConsoleAppender" } },
- // Root Logger
- root : { levelmax : "INFO", appenders : "*" },
- // Implicit Level Categories
- info : [ "coldbox.system" ]
- };
- /**
- * --------------------------------------------------------------------------
- * Layout Settings
- * --------------------------------------------------------------------------
- */
- layoutSettings = { defaultLayout : "", defaultView : "" };
- /**
- * --------------------------------------------------------------------------
- * Custom Interception Points
- * --------------------------------------------------------------------------
- */
- interceptorSettings = { customInterceptionPoints : [] };
- /**
- * --------------------------------------------------------------------------
- * Application Interceptors
- * --------------------------------------------------------------------------
- * Remember that the order of declaration is the order they will be registered and fired
- */
- interceptors = [];
- /**
- * --------------------------------------------------------------------------
- * Module Settings
- * --------------------------------------------------------------------------
- * Each module has it's own configuration structures, so make sure you follow
- * the module's instructions on settings.
- *
- * Each key is the name of the module:
- *
- * myModule = {
- *
- * }
- */
- moduleSettings = {};
- /**
- * --------------------------------------------------------------------------
- * Flash Scope Settings
- * --------------------------------------------------------------------------
- * The available scopes are : session, client, cluster, ColdBoxCache, or a full instantiation CFC path
- */
- flash = {
- scope : "session",
- properties : {}, // constructor properties for the flash scope implementation
- inflateToRC : true, // automatically inflate flash data into the RC scope
- inflateToPRC : false, // automatically inflate flash data into the PRC scope
- autoPurge : true, // automatically purge flash data for you
- autoSave : true // automatically save flash scopes at end of a request and on relocations.
- };
- /**
- * --------------------------------------------------------------------------
- * App Conventions
- * --------------------------------------------------------------------------
- */
- conventions = {
- handlersLocation : "handlers",
- viewsLocation : "views",
- layoutsLocation : "layouts",
- modelsLocation : "models",
- eventAction : "index"
- };
- }
- /**
- * Development environment
- */
- function development(){
- // coldbox.customErrorTemplate = "/coldbox/system/exceptions/BugReport.cfm"; // static bug reports
- coldbox.customErrorTemplate = "/coldbox/system/exceptions/Whoops.cfm"; // interactive bug report
- }
- }
|