Documentation Home
This page describes a pre-release version of jasmine-browser-runner (3.0.0-beta-1). There may be additional changes, including breaking changes, before the final 3.0.0 release.
The current stable version of jasmine-browser-runner is 2.5.

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() → {Promise.<undefined>}

Starts the server.

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() → {Promise.<undefined>}

Starts the server.

Returns:

A promise that resolves upon successful start.

Type
Promise.<undefined>

stop() → {Promise.<undefined>}

Stops the server.

Returns:
Type
Promise.<undefined>