This is the main file. This object holds the config and more data.


Methods

getConfig (identifier)

This method returns the value of the config. When no identifier is given the complete config is returned.

When a part of the identifier isn't found in the config false will be returned.

Parameters

Name Type Description
identifier String/null The dot-separated identifier of the config value.

Returned Value

: The data found in the config.


getInstance ()

static

This method maked sure you will only and always have the single Raddish object.

Returned Value


preStart (callback)

This method will insert all the data for the related modules All the data inserted is loaded from the config.json file.

Usually this method isn't called manually, however if you want a specific method to be executed before start you can do so.

Parameters

Name Type Description
callback Function An optional callback for the preStart method.

Returned Value

Raddish: The current object for chaining.


registerApplication (path)

This method proxies the path to Application.registerApplication and returns itself.

Parameters

Name Type Description
path String The absolute path to the application.

Returned Value

Raddish: The current object for chaining.


setConfig (conf)

This method sets the config and all of its values.

Parameters

Name Type Description
conf String/ Object/ undefined The optional config for Raddish.

Returned Value

Raddish: the current object for chaining.


start (port)

This method starts the server. All the requests that come in will be passed to the router. Which will pick it up from here.

Parameters

Name Type Description
port Int The optional port number.

Returned Value

Raddish: The current object for chaining.