App.properties (3.2) - Axiom

The app.properties file, located in the root of an application's code repository, may override some properties specified inserver.propertieson a per-application basis. OnlyextensionsanddbHomemaynotbe overridden in app.properties. Please see the documentation forserver.propertiesfor a complete list of these properties.


Additionally, the following additional properties may be specified:

mountpoint = /

Defines where the root object of the application is located in Axiom's URI space.

modules = some_module, some_other_module

The modules property contains a comma seperated list of code repositories you want to load as modules or libraries for use by your application. They are loaded in order from last to first, so definitions in the module listed before will override ones listed after. For example, if some_module and some_other_module both define a function foo, the definition in some_module takes precedence.

static.0 = path/to/static/files
static.1 = path/to/more/static/files

The static list specifics a series of directories to be staticly served through Axiom. Files in lower-number repositories override higher-numbered ones. The paths can be absolute (e.g. c:/path/to/static/files) or relative (e.g. path/to/static/files). If the path is relative, then it is interpreted as relative to the current directory where the app.properties file is residing.

staticMountpoint = /static

Defines where static content is served out on Axiom's URI space.

db.blob.dir = /absolute/path/to/binary/content

The absolute path to where binary files are stored (File/Image objects). If this property is not specified, the default location of storage is $AXIOM_HOME/db/app_name/blob

uploadLimit = 200000

Hard limit on http request size, in kilobytes. Requests over this size will be rejected by Axiom.

cookieDomain = example.com

Specifies the domain across which user sessions persist. Must be specified to in order have a session work across all subdomains of a domain.

hrefFunction = someFunction

The name of a function to be called to postprocess the result of the getURI() function. The function should take single argument (the result of the getURI function) and return the modified string result.

cron.<cron_name>.hour = <hour>
cron.<cron_name>.minute = <minute>
cron.<cron_name>.function = <global_function>

The specification of a cron job at <hour>:<minute> which runs <global_function>. You can specify multiple cron jobs in an app.properties file.

cachesize = 1000

The cachesize specifies the maximum number of Axiom objects to keep in cache for the given application at any point in time. This example indicates that 1000 objects can be in the cache at any point in time, and if the number of objects loaded into the system exceeds 1000, then a LRU policy is used to replace objects in the cache.

maxThreads = 500

The maximum number of simultaneous requests the server can handle. Any additional simultaneous requests will wait until a request is completed and threads are relinquished.

debug = true

Specifies whether additional debug information should be included in the log files. A value of true indicates the additional logging should occur, while a value of false indicates to suppress the additional logging. Production systems will most likely want to set the value to false to prevent unnecessary logging that could consume I/O cycles.

autoResourceUpdate = true

Specifies whether changes to resources in any of the code repositories gets automatically loaded by Axiom without a restart. During development you will want this set to true for convenience of not having to restart Axiom everytime you make a code change. During deployment, you will most likely want to set this to false as it improves performance if Axiom is not constantly checking for code/resource updates.

sessionTimeout = 360

Specifies the amount of time to elapse before a session times out. The value is specified in minutes, so the above example indicates that sessions inside Axiom automatically timeout after 6 hours.

onStart = onStart1, onStart2

Specifies a comma seperated list of global functions to be invoked on application startup. If this property is not specified, the default is to just invoke the onStart method, if one is defined. In the above example, on application startup, the global methods onStart1 and onStart2 will get invoked.

object.status.default = z

The default status value assigned to objects upon creation, which can be obtained by doing obj._status.

query.status.default = z

The default status value that will be used to query for objects. All objects that have a status of the defined value will be included in the query's potential result set.

draftHost.1 = staging.domain.com 
draftHost.2 = preview.domain.com

The draftHost property allows you to specify different layers on which objects exist. By default, all objects are created and stored in the "live" layer. The draftHost allows you to define other layers at which objects can exist. In the above example, any request with the domain of staging.domain.com that creates and persists objects will persist them in layer 1. Any request with the domain of preview.domain.com that creates and persists objects will persist them in layer 2. Objects in layer X can see all objects in its layer and all those above it. Objects in the top layer (the "live" layer) are only exposed to the objects on its own layer since it is the top most layer. This functionality has particular application for the CMS.

doctype = <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

If specified, all XML object responses (e.g. res.write(xml_object)) will be prepended with the doctype value.