Extends
- EventEmitter
Members
(static) app.module :Object
Type:
- Source:
config :ApplicationConfig
Type:
config :ApplicationConfig
Type:
config :ApplicationConfig
Gets or sets application configuration settings
Type:
config :ApplicationConfig
Type:
configPath :*
Gets the current application configuration path
Type:
- *
development :string
Gets or sets a boolean that indicates whether the application is in development mode
Type:
- string
errors :Object|*
Type:
- Object | *
handlers :Array
Gets or sets a collection of application handlers
Type:
- Array
module :AngularServerModule
Type:
(inner) $cache :HttpCache
Type:
Methods
(static) app.document(sopt) → {HTMLDocument}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
s |
string |
<optional> |
- Source:
Returns:
- Type
- HTMLDocument
controller(name, ctor) → {*}
Get or sets an HTTP controller
Parameters:
Name | Type | Description |
---|---|---|
name |
string | |
ctor |
function | * |
Returns:
- Type
- *
createContext(request, response) → {HttpContext}
Creates an instance of HttpContext class.
Parameters:
Name | Type | Description |
---|---|---|
request |
ClientRequest | |
response |
ServerResponse |
Returns:
- Type
- HttpContext
db() → {AbstractAdapter}
Gets the default data context based on the current configuration
Returns:
- Type
- AbstractAdapter
decrypt()
Decrypts the given data.
directive(name, ctor) → {HttpApplication|function}
Parameters:
Name | Type | Description |
---|---|---|
name |
string | |
ctor |
function | The class constructor associated with this controller |
Returns:
- Type
- HttpApplication | function
encypt()
Encrypts the given data
execute(fn)
Executes an internal process
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
executeExternalRequest(options, data, callback)
Parameters:
Name | Type | Description |
---|---|---|
options |
* | |
data |
* | |
callback |
function |
executeRequest(options, callback)
Parameters:
Name | Type | Description |
---|---|---|
options |
* | string | |
callback |
function |
extend()
Load application extension
getAuthCookie(context, username)
Sets the authentication cookie that is associated with the given user.
Parameters:
Name | Type | Description |
---|---|---|
context |
HttpContext | |
username |
String |
init() → {HttpApplication}
Initializes application configuration.
Returns:
- Type
- HttpApplication
mapPath()
Returns the path of a physical file based on a given URL.
onError(context, err, callback)
Parameters:
Name | Type | Description |
---|---|---|
context |
HttpContext | |
err |
Error | HttpException | |
callback |
function |
processRequest(context, callback)
Parameters:
Name | Type | Description |
---|---|---|
context |
HttpContext | |
callback |
function |
resolveETag(fileopt, callback)
Resolves ETag header for the given file. If the specifed does not exist or is invalid returns null.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
file |
string |
<optional> |
A string that represents the file we want to query |
callback |
function |
resolveMime(request)
Parameters:
Name | Type | Description |
---|---|---|
request |
String | IncomingMessage |
service(name, ctoropt) → {HttpApplication|function}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | ||
ctor |
function |
<optional> |
The class constructor associated with this controller |
Returns:
- Type
- HttpApplication | function
setAuthCookie(context, username, optionsopt)
Sets the authentication cookie that is associated with the given user.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
context |
HttpContext | ||
username |
String | ||
options |
* |
<optional> |
start(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
ApplicationOptions | * |
unattended(fn)
Executes an unattended internal process
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
unmodifiedRequest(context, executionPath, callback)
Parameters:
Name | Type | Description |
---|---|---|
context |
HttpContext | |
executionPath |
string | |
callback |
function |