クラス: Server

Server()

HTTP経由で仕様とサポートファイルを配信します。

コンストラクタ

new Server()

メソッド

port() → {number}

サーバーがリスニングしているポートを取得します。このメソッドが呼び出される前に、サーバーを起動する必要があります。

戻り値

ポート番号

タイプ
数値

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

サーバーを起動します。

パラメータ
名前 タイプ 説明
options ServerStartOptions
戻り値

正常に起動されるプロミスです。

タイプ
Promise.<undefined>

stop() → {Promise.<undefined>}

サーバーを停止します。

戻り値
タイプ
Promise.<undefined>

Server(options)

new Server(options)

パラメータ
名前 タイプ 説明
options ServerCtorOptions

メソッド

port() → {number}

サーバーがリスニングしているポートを取得します。このメソッドが呼び出される前に、サーバーを起動する必要があります。

戻り値

ポート番号

タイプ
数値

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

サーバーを起動します。

パラメータ
名前 タイプ 説明
options ServerStartOptions
戻り値

正常に起動されるプロミスです。

タイプ
Promise.<undefined>

stop() → {Promise.<undefined>}

サーバーを停止します。

戻り値
タイプ
Promise.<undefined>