unjs/get-port-please

Auto host fallback

Closed this issue · 0 comments

pi0 commented

Context: nuxt/nuxt#20019

When get-port-please is unable to obtain a port, the issue is usually because of a wrong hostname option. In order to improve DX, we shall implement a fallback strategy to try with localhost > 127.0.0.1 and "" (only if explicit public option is provided to avoid unwanted exposure)