App Namespace


Sub-namespaces


Classes


Console

constructor

With the help of this method you can create a new instance of Console.

Signature

constructor(void) : Object|Console

Returns

  • Object, Console
    • A new instance of Console

print

Simple process.stdout.write wrapper.

Signature

print(String str) : void

Parameters

  • str
    • String to print
    • Type: String

section

Print a given message as a section.

Signature

section(String str) : void

Parameters

  • str
    • String to print as section
    • Type: String

heading

Print a given message as a heading.

Signature

heading(String str) : void

Parameters

  • str
    • String to print as heading
    • Type: String

clear

Clear the terminal.

Signature

clear(void) : void

ask

Ask a question.

Signature

ask(Object options, Function callback, Function abort) : void

Parameters

  • options
    • Options to use
    • Type: Object
  • callback
    • Function to call on finish
    • Type: Function
  • abort
    • Function to call on abort
    • Type: Function

buildQuestion

Build a new Question Object.

Signature

buildQuestion(void) : Object

Returns

  • Object
    • The return value is not further described

buildQuestionSet

Build a new QuestionSet Object.

Signature

buildQuestionSet(void) : Object

Returns

  • Object
    • The return value is not further described


QuestionSet

constructor

With the help of this method you can create a new instance of QuestionSet.

Signature

constructor(void) : Object|QuestionSet

Returns

  • Object, QuestionSet
    • A new instance of QuestionSet

ask

Ask the questions of the question set.

Signature

ask(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function


Question

constructor

With the help of this method you can create a new instance of Question.

Signature

constructor(void) : Object|Question

Returns

  • Object, Question
    • A new instance of Question

ask

Ask the question.

Signature

ask(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function


Worker

constructor

With the help of this method you can create a new instance of Worker.

Signature

constructor(Object options) : Object

Parameters

  • options
    • Options object
    • Type: Object

Returns

  • Object
    • Options object

getLogger

Get the winston logger instance.

Signature

getLogger(void) : Object

Returns

  • Object
    • The return value is not further described

getCliArgs

Get the worker commandline interface arguments.

Signature

getCliArgs(void) : Object

Returns

  • Object
    • The return value is not further described

getContext

Get the concrete worker implementation.

Signature

getContext(void) : Object

Returns

  • Object
    • The return value is not further described

configureCliArguments

Parse CLI arguments.

Signature

configureCliArguments(void) : void

configureLogger

Setup logger instance.

Signature

configureLogger(void) : void

configureContext

Setup context.

Signature

configureContext(void) : void

loadControllers

Load given controllers.

Signature

loadControllers(Object controllers, Function callback) : void

Parameters

  • controllers
    • Configuration of controllers to load
    • Type: Object
  • callback
    • Function to call on finish
    • Type: Function

loadModules

Load given modules.

Signature

loadModules(Array modules, Function callback) : void

Parameters

  • modules
    • Modules to load
    • Type: Array
  • callback
    • Function to call on finish
    • Type: Function

configureDatabases

Setup database connections.

Signature

configureDatabases(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

configureDefaultControllers

Setup Greppy default controllers.

Signature

configureDefaultControllers(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

configureContextModules

Setup context modules.

Signature

configureContextModules(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

configureApplicationStack

Setup the application stack.

Signature

configureApplicationStack(Object app, Object server, Function callback) : void

Parameters

  • app
    • The application object
    • Type: Object
  • server
    • Server object
    • Type: Object
  • callback
    • Function to call on finish
    • Type: Function

configure

Setup the worker.

Signature

configure(Object app, Object server, Function callback) : void

Parameters

  • app
    • Express application object
    • Type: Object
  • server
    • HTTP(S) server object
    • Type: Object
  • callback
    • Function to call on finish
    • Type: Function