Class for the current app's metadata
Platform Support
| Jaxer Server Framework | Jaxer Client Framework | 1.0 | no |
|---|
Constructors
| Constructor | Action | Jaxer Server Framework | Jaxer Client Framework | |||||
|---|---|---|---|---|---|---|---|---|
Jaxer.App Constructor(Object props) : Jaxer.App The constructor of an object that describes the current app's metadata | Show Details | 1.0 | no | |||||
Jaxer.App(Object props) : Jaxer.AppThe constructor of an object that describes the current app's metadata Parameters
Returns
| ||||||||
Properties
| Property | Action | Jaxer Server Framework | Jaxer Client Framework |
|---|---|---|---|
APP_KEY
: String The fully-evaluated key to use when persisting or restoring values in the scope of the current application, using Jaxer.application. If this app's "appKey" property was a function, it will have been evaluated to a string using the current request. | Show Details | 1.0 | no |
| |||
appKey
: String The key to use when persisting or restoring values in the scope of the current application, using Jaxer.application. This can be a string or a function: the function takes the request's parsedUrl as its sole parameter, and returns the key. The key should be unique across all applications. The appKey will first default to the application name if not specified, then finally to the default appKey in the case of the standard install the default appKey will be localhost:8081 | Show Details | 1.0 | no |
db
: Object The database connection parameters to use by default for the current application. This can be an object or a function: the function takes the app's name and the request's parsedUrl as its two parameters, and returns the database connection parameters to use. | Show Details | 1.0 | no |
| |||
DB
: Object The fully-evaluated database parameters to use by default for the current application. If this app's "db" property was a function, it will have been evaluated to an object using the current request. | Show Details | 1.0 | no |
| |||
handler
: String For service-type (not page-type) requests where Jaxer is the handler (and it's not a callback), this determines how the request is handled. It can be a string or a function: the function takes the app's name and the request's parsedUrl as its two parameters, and is executed right after the (empty) DOM is created and ready. If it returns a string, or if the handler property is already a string, that string should be the file://...-type URL location of a JavaScript file to be loaded and executed to handle this request. | Show Details | 1.0 | no |
| |||
HANDLER
: String The fully-evaluated file://...-type URL location of a JavaScript file to be loaded and executed to handle this request If this app's "handler" property was a function, it will have been evaluated to a string using the current request. If this app's "handler" function did not return a string, this property will be set to null, and no JavaScript file will be loaded. | Show Details | 1.0 | no |
| |||
name
: String The name to use for the current application. This can be a string or a function: the function takes the request's parsedUrl as its sole parameter, and returns the name. The name should be unique across all applications (this is checked at server start). | Show Details | 1.0 | no |
| |||
NAME
: String The fully-evaluated name to use for the current application. If this app's "name" property was a function, it will have been evaluated to a string using the current request. | Show Details | 1.0 | no |
| |||
PAGE_KEY
: String The fully-evaluated key to use when persisting or restoring values in the scope of the current page, using Jaxer.page or Jaxer.sessionPage. If this app's "pageKey" property was a function, it will have been evaluated to a string using the current request. | Show Details | 1.0 | no |
| |||
pageKey
: String The key to use when persisting or restoring values in the scope of the current page, using Jaxer.page or Jaxer.sessionPage. This can be a string or a function: the function takes the request's parsedUrl as its sole parameter, and returns the key. The key should be unique across all pages for any application. | Show Details | 1.0 | no |
path
: String The filesystem path to use by default for the current application. This can be a string or a function: the function takes the app's name and the request's parsedUrl as its two parameters, and returns the parameters to use. | Show Details | 1.0 | no |
| |||
PATH
: String The fully-evaluated filesystem path to use by default for the current application. If this app's "path" property was a function, it will have been evaluated to a string using the current request. | Show Details | 1.0 | no |
| |||
The object that determines whether this app should be used for the current request. If a function, it takes the request's parsedUrl as its sole parameter, and returns true if this app should be used. If a regular expression, it should match against the request's parsedUrl's path if this app should be used. If a string, it should match the beginning of the request's parsedUrl's path if this app should be used. | No Details | 1.0 | no |
Functions
| Method | Action | Jaxer Server Framework | Jaxer Client Framework |
|---|---|---|---|
Calls the handler function for this app, if there is a handler and it's a function. In any case it also sets the HANDLER property for this app. | No Details | 1.0 | no |
Initializes (creates if necessary) the path for this app, if any | No Details | 1.0 | no |
