Application

Introduced 4.0.0

Stability: 2 - Stable

const Application = require('kado/lib/Application')

The Application library provides an interface meant to make use of the Kado libraries in a system form.

Class: Application

static Application.getInstance(name)

Application.constructor()

Application.setConfig(cfg)

Application.setName(name)

Application.setTrustProxy(trustProxy)

Application.setVersion(version)

Application.addModules(mod)

Adds a new module to the system.

Application.getModule(name)

Get a module by name if it exists.

Application.removeModule(name)

Remove a module by name if it exists.

Application.lib(name)

Note: this will require the library and fail if it doesnt exists. Use app.library.search(name) to check for a libraries existence.

Application.start(argv)

This will setup and connect sub systems, then check for a command to execute, tests to run, or will default to starting any http servers.

Application.listen()

Note: When the application is started only connectors are setup. This method must be called to listen on ports. This is by design to support cleaner initialization for scripting.

Application.stop()

This will stop listening of any servers, disconnect sub systems and close connections.

Application.getDefaultConfig()

Internal Use

Application.setupMode()

Internal Use

Application.setupPaths()

Internal Use

Application.setupLog()

Internal Use

Application.setupLibrary()

Internal Use

Application.setupConnect()

Internal Use

Application.setupDatabase()

Internal Use

Application.setupEmail()

Internal Use

Application.setupEvent()

Internal Use

Application.setupHyperText()

Internal Use

Application.setupLanguage()

Internal Use

Application.setupView()

Internal Use

Application.setup()

Calls the above listed setup functions.

Internal Use

Application.startConnect()

Internal Use

Application.stopConnect()

Internal Use

Application.test(argv)

Internal Use

Application.command(argv)

Internal Use

Application.startServer()

Internal Use

Application.stopServer()

Internal Use