ServerDirective

libflitter/directives/ServerDirective~ ServerDirective

Provides the Flitter CLI command to launch a normal Flitter HTTP server.

Constructor

new ServerDirective()

Source:

Extends

Methods

(static) help() → {string}

Source:

Get the help text for the directive. Used by ./flitter help.

Returns:
Type
string

(static) name() → {string}

Source:

Get the name of the directive. Used by ./flitter.

Returns:

"up"

Type
string

(async) handle(app, argv) → {Promise.<void>}

Source:
Overrides:

Handle an invocation of this directive. Creates a new instance of module:libflitter/app/AppUnit~AppUnit and calls the module:libflitter/app/AppUnit~AppUnit#go method on it to launch the server.

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp

the Flitter app

argv Array

list of CLI arguments passed to the directive

Returns:
Type
Promise.<void>