/
Application.cfc
40 lines (34 loc) · 1.58 KB
/
Application.cfc
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
/**
* Copyright Since 2005 Ortus Solutions, Corp
* www.coldbox.org | www.luismajano.com | www.ortussolutions.com | www.gocontentbox.org
**************************************************************************************
*/
component{
this.name = "A TestBox Runner Suite " & hash( getCurrentTemplatePath() );
// any other application.cfc stuff goes below:
this.sessionManagement = true;
// COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP
COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( expandPath( '../Application.cfc' ) );
// The web server mapping to this application. Used for remote purposes or static purposes
COLDBOX_APP_MAPPING = "/";
// COLDBOX PROPERTIES
COLDBOX_CONFIG_FILE = "config.Coldbox";
// COLDBOX APPLICATION KEY OVERRIDE
COLDBOX_APP_KEY = "";
// any mappings go here, we create one that points to the root called test.
this.mappings[ "/tests" ] = getDirectoryFromPath( getCurrentTemplatePath() );
rootPath = REReplaceNoCase( this.mappings[ "/tests" ], "tests(\\|/)", "" );
this.mappings[ "/root" ] = rootPath;
this.mappings[ "/relax" ] = COLDBOX_APP_ROOT_PATH & "modules/relax";
this.mappings[ "/cbjavaloader" ] = COLDBOX_APP_ROOT_PATH & "modules/cbjavaloader";
// application start
public boolean function onApplicationStart(){
application.cbBootstrap = new coldbox.system.Bootstrap( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING );
application.cbBootstrap.loadColdbox();
return true;
}
// request start
public boolean function onRequestStart( String targetPage ){
return true;
}
}