The application class will hold a registry of all the registred applications, next to that it will act as a basic class for the applications.


Methods

_getComponentConfig (component)

private

This method will return the component config if the requested component.

Parameters

Name Type Description
component String The component to return the config from.

Returned Value

Object: The component config.


executeComponent (component, request, response)

This method tries to execute a component within the context of the application. When the component doesn't exist an error is thrown.

Parameters

Name Type Description
component String The name of the component to run.
request Request The NodeJS HTTP request object.
response Response The NodeJS HTTP response object.

Returned Value

Object: the found component.


findApplication (alias)

This method will try to find a registred application. When the application isn't found an error is thrown.

Parameters

Name Type Description
alias String The alias of the application.

Returned Value

Application: The Application that is found.


registerApplication (path)

This method will register an application to Raddish. If the application isn't found you will receive an error on startup.

Parameters

Name Type Description
path Object Path to the application file.

Returned Value

Application: The current application layer for chaining.