AppEngine

Server.Modules. AppEngine

# new AppEngine(coreObj) → {Server.Modules.AppEngine}

This is the AppEngine Module of the Blackrock Application Server. It loads all apps and the controllers and other files within them and manages access to all of these files - in tandem with the Router Module - from any Interface. It also exposes a Swagger 2.0 Compliant API Definition file for each of your apps (can be toggled on/off in config), which can easily be paired up with SwaggerUI in your app's html folder for quick and easy documentation and testing.

Parameters:
Name Type Description
coreObj Server.Modules.Core

The Core Module Singleton

Author:
  • Darren Smith
License:
  • Licensed under the LGPL license.
Returns:

module - The AppEngine Module Singleton

Type
Server.Modules.AppEngine

Extends

Classes

app

Methods

# (static) appStats(name) → {object}

Tbc...

Parameters:
Name Type Description
name string

App Name

Returns:

appStatsObj - App Stats Object

Type
object
Example
Tbc...

# (static) list() → {array}

Tbc...

Returns:

apps - List of App Names

Type
array
Example
Tbc...

# (static) load(appName, appCfgopt, groupopt) → {Promise}

Tbc...

Parameters:
Name Type Attributes Description
appName string

The Name of the App to Load

appCfg object <optional>

The App Configuration Object

group string <optional>

The Relative Path Of The Filesystem Group The App Is In

To Do:
  • Allow loadApp() method to load apps from remote URLs and from specific paths
Returns:

Promise - Promise That Must Be Listened To (Then + Catch)

Type
Promise
Example
Tbc...

# (static) reloadApp(name) → {boolean}

Tbc...

Parameters:
Name Type Description
name string

App Name to Reload

Returns:

result - Result of Reload

Type
boolean
Example
Tbc...

# (static) search(searchObj, cb)

Tbc...

Parameters:
Name Type Description
searchObj object

Search Definition Object

cb function

Callback Function

Example
{
  apps: ["app1", "app2"],
  hostname: "localhost",
  url: "/web/users/1"
}

# (static) unloadApp(name) → {boolean}

Tbc...

Parameters:
Name Type Description
name string

App Name to Unload

Returns:

result - Result of Unload

Type
boolean
Example
Tbc...