php-server icon indicating copy to clipboard operation
php-server copied to clipboard

Inconsistent behavior between `hostname` and `open`.

Open coolhome opened this issue 2 years ago • 1 comments

Below was pretty confusing. When setting open to a string I would expect it to be check relative vs absolute.

hostname: '0.0.0.0' open: true Opens browser with 0.0.0.0:8080

hostname: '0.0.0.0' open: 'http://127.0.0.1:8080', Opens browser with 0.0.0.0:8080/http://127.0.0.1:8080

hostname: 'localhost' (resolves to 127.0.0.1) open: true Errors with Warning: Could not start the PHP server: connect ECONNREFUSED 127.0.0.1:9119 Use --force to continue. Likely would of opened 127.0.0.1:9119:8080 instead of localhost:8080

coolhome avatar Jun 01 '22 00:06 coolhome

I would expect it to be check relative vs absolute.

It's documented to require a relative URL, but I'm not again supporting absolute URL too.

sindresorhus avatar Jun 01 '22 08:06 sindresorhus