Module: models/http/baseHttpServer

The base implementation of http/s servers

Source:

Methods

createServer(logger, options) → {Object}

Creates the http/s server, opening up the socket

Parameters:
Name Type Description
logger Object

The logger

options Object

Creation options

Source:
Returns:
Type
Object

initialize(baseLogger, allowInjection, recordRequests, debug) → {Object}

Initializes the http/s server. I'm certainly not in love with the layers of creation
(setup -> initialize -> create)

Parameters:
Name Type Description
baseLogger object

the base logger

allowInjection boolean

The --allowInjection command line parameter

recordRequests boolean

The --mock command line parameter

debug boolean

The --debug command line parameter

Source:
Returns:
Type
Object

(inner) setup(protocolName, createBaseServer) → {Object}

Sets up the creation method for the given protocol

Parameters:
Name Type Description
protocolName string

http or https

createBaseServer function

The function to create the http or https server

Source:
Returns:
Type
Object