Documentation Home
This page is for an older version of jasmine-browser-runner (2.4).
The current stable version of jasmine-browser-runner is: 2.5. You can also look at the docs for the next release: Edge

Class: Server

Server()

Serves the specs and supporting files via HTTP.

Constructor

new Server()

Methods

hostname() → {string}

Gets the hostname that the server is listening on. The server must be started before this method is called.

Returns:

The hostname (localhost if not specified)

Type
string

port() → {number}

Gets the port that the server is listening on. The server must be started before this method is called.

Returns:

The port number

Type
number

scheme() → {string}

Gets the URL scheme that the server is listening on. The server must be started before this method is called.

Returns:

The URL scheme ('http' or 'https')

Type
string

start(options) → {Promise.<undefined>}

Starts the server.

Parameters:
Name Type Description
options ServerStartOptions
Returns:

A promise that resolves upon successful start.

Type
Promise.<undefined>

stop() → {Promise.<undefined>}

Stops the server.

Returns:
Type
Promise.<undefined>

Server(options)

new Server(options)

Parameters:
Name Type Description
options ServerCtorOptions

Methods

hostname() → {string}

Gets the hostname that the server is listening on. The server must be started before this method is called.

Returns:

The hostname (localhost if not specified)

Type
string

port() → {number}

Gets the port that the server is listening on. The server must be started before this method is called.

Returns:

The port number

Type
number

scheme() → {string}

Gets the URL scheme that the server is listening on. The server must be started before this method is called.

Returns:

The URL scheme ('http' or 'https')

Type
string

start(options) → {Promise.<undefined>}

Starts the server.

Parameters:
Name Type Description
options ServerStartOptions
Returns:

A promise that resolves upon successful start.

Type
Promise.<undefined>

stop() → {Promise.<undefined>}

Stops the server.

Returns:
Type
Promise.<undefined>