Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines the common interface and shared functionality that all Servers should have.

Hierarchy

  • HttpServer

Index

Constructors

constructor

Properties

Private httpServer

httpServer: Server = null

Internal Node.js http server.

Protected serverManagers

serverManagers: object

List of ServerManagers in charge of the server.

Type declaration

Methods

attach

  • attach(name: string, manager: ServerManager): this
  • attach(managers: object): this

configure

getManager

Private getOrderedServerManagerKeys

  • getOrderedServerManagerKeys(): string[]

isRunning

  • isRunning(): boolean

start

  • start(): Promise<boolean>
  • Starts the HttpServer and returns a Promise for when it's ready.

    Returns Promise<boolean>

stop

  • stop(): Promise<boolean>
  • Stops the HttpServer and returns a Promise for when it's done.

    Returns Promise<boolean>

with

  • with(name: string, manager: ServerManager): this
  • with(managers: object): this

Object literals

Protected config

config: object

Where the HttpServer configurations are stored.

host

host: string = "localhost"

port

port: number = 3000

Generated using TypeDoc