This is a Coldbox.cdc in config directory
/** structures/arrays to create for configuration- coldbox (struct)
- settings (struct)
- conventions (struct)
- environments (struct)
- wirebox (struct)
- ioc (struct)
- debugger (struct)
- mailSettings (struct)
- i18n (struct)
- webservices (struct)
- datasources (struct)
- layoutSettings (struct)
- layouts (array of structs)
- cacheBox (struct)
- interceptorSettings (struct)
- interceptors (array of structs)
- modules (struct)
- logBox (struct)
- flash (struct)
- orm (struct)
- validation (struct)
Available objects in variable scope
- controller
- logBoxConfig
- appMapping (auto calculated by ColdBox)
Required Methods
- configure() : The method ColdBox calls to configure the application.
Optional Methods - detectEnvironment() : If declared the framework will call it and it must return the name of the environment you are on.
- {environment}() : The name of the environment found and called by the framework.
*/
// Configure ColdBox Application
function configure(){
// coldbox directives
coldbox = {
//Application Setup
appName = “Your app name here”,
eventName = “event”,
//Development Settings
debugMode = true,
debugPassword = “”,
reinitPassword = “”,
handlersIndexAutoReload = true,
//Implicit Events
defaultEvent = “”,
requestStartHandler = “Main.onRequestStart”,
requestEndHandler = “”,
applicationStartHandler = “Main.onAppInit”,
applicationEndHandler = “”,
sessionStartHandler = “”,
sessionEndHandler = “”,
missingTemplateHandler = “”,
//Extension Points
UDFLibraryFile = “includes/helpers/ApplicationHelper.cfm”,
coldboxExtensionsLocation = “”,
modulesExternalLocation = [],
pluginsExternalLocation = “”,
viewsExternalLocation = “”,
layoutsExternalLocation = “”,
handlersExternalLocation = “”,
requestContextDecorator = “”,
//Error/Exception Handling
exceptionHandler = “”,
onInvalidEvent = “”,
customErrorTemplate = “”,
//Application Aspects
handlerCaching = false,
eventCaching = false,
proxyReturnCollection = false
/*
datasources = {
mysite = { name=“contacts”, dbType=“MSSQL”, username="", password=""}
}
Application.cfc (4.73 KB)
Coldbox.cfc (7.03 KB)
ContactDAO.cfc (2.57 KB)