Reference Source
public class | source

RestifyServer

Extends:

devapt-core-common/dist/js/base/distributed_instance~DistributedInstanceServerRoutableServer → RestifyServer

Constructor Summary

Public Constructor
public

constructor(arg_name: string, arg_settings: object, arg_log_context: string): nothing

Create Restify server instance.

Member Summary

Public Members
public
public

server: *

public

Method Summary

Public Methods
public

add_get_route(arg_cfg_route: object, arg_callback: function): boolean

Get server middleware for directory route.

public

build_server(): nothing

Build private server instance.

public

get_middleware_for_static_route(arg_cfg_route: object): middleware

Get server middleware for static route.

Inherited Summary

From class Server
public
public
public
public

server: *

public
public
public
public
public
public
public
public
public

build_server(): nothing

Build private server instance.

public

disable(): nothing

Disable server (stop it).

public

enable(): nothing

Enable server (start it).

public

get_security_settings(): Immutable.Map

Get security settings from server or runtime.

public

Get security settings object into the server.

public

get_topology_info(arg_deep: boolean, arg_visited: object): object

Get topology item informations.

public

load(): nothing

Load server settings.

public

use_service_on_loading(arg_application: Application, arg_service: Service, arg_app_svc_cfg: object): nothing

Add a service to use before or after security check.

From class RoutableServer
public
public

add_get_route(arg_cfg_route: object, arg_callback: function): boolean

Get server middleware for directory route.

public

disable(): nothing

Disable server (stop it).

public

enable(): nothing

Enable server (start it).

public

get_middleware_for_static_route(arg_cfg_route: object): middleware

Get server middleware for static route.

Public Constructors

public constructor(arg_name: string, arg_settings: object, arg_log_context: string): nothing source

Create Restify server instance.

Override:

RoutableServer#constructor

Params:

NameTypeAttributeDescription
arg_name string

server name

arg_settings object

plugin settings map

arg_log_context string

trace context string.

Return:

nothing

Public Members

public is_restify_server: boolean source

public server: * source

Override:

Server#server

public server_url: * source

Public Methods

public add_get_route(arg_cfg_route: object, arg_callback: function): boolean source

Get server middleware for directory route.

Override:

RoutableServer#add_get_route

Params:

NameTypeAttributeDescription
arg_cfg_route object

plain object route configuration.

arg_callback function

route handler callback.

Return:

boolean

success or failure.

public build_server(): nothing source

Build private server instance.

Override:

Server#build_server

Return:

nothing

public get_middleware_for_static_route(arg_cfg_route: object): middleware source

Get server middleware for static route.

Override:

RoutableServer#get_middleware_for_static_route

Params:

NameTypeAttributeDescription
arg_cfg_route object

plain object route configuration.

Return:

middleware

middleware function as f(req, res, next)