wait-for-localhost
Advanced tools
Comparing version 3.2.0 to 3.3.0
@@ -5,10 +5,19 @@ declare namespace waitForLocalhost { | ||
@default 80 | ||
*/ | ||
*/ | ||
port?: number; | ||
/** | ||
Use a custom path. | ||
For example, `/health` for a health-check endpoint. | ||
@default '/' | ||
*/ | ||
path?: string; | ||
/** | ||
Use the `GET` HTTP-method instead of `HEAD` to check if the server is running. | ||
@default false | ||
*/ | ||
*/ | ||
useGet?: boolean; | ||
@@ -15,0 +24,0 @@ } |
@@ -13,3 +13,3 @@ 'use strict'; | ||
const main = () => { | ||
const request = http.request({method, port: options.port}, response => { | ||
const request = http.request({method, port: options.port, path: options.path}, response => { | ||
if (response.statusCode === 200) { | ||
@@ -16,0 +16,0 @@ return resolve(); |
{ | ||
"name": "wait-for-localhost", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "Wait for localhost to be ready", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -42,2 +42,11 @@ # wait-for-localhost [![Build Status](https://travis-ci.org/sindresorhus/wait-for-localhost.svg?branch=master)](https://travis-ci.org/sindresorhus/wait-for-localhost) | ||
##### path | ||
Type: `string`<br> | ||
Default: `'/'` | ||
Use a custom path. | ||
For example, `/health` for a health-check endpoint. | ||
##### useGet | ||
@@ -44,0 +53,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4611
63
68