Hi, would you be willing to add (or accept a PR for) an API mode? Basically just return a promise that resolves once the server is available (I want to use this in a CLI tool).
const waitForLocalhost = require('wait-for-localhost');
(async () => {
await waitForLocalhost({ port });
// ready to do some stuff, e. g. access served files
})();
Edit: whoops, just saw that someone already submitted PR #2 for that 🙈
Hi, would you be willing to add (or accept a PR for) an API mode? Basically just return a promise that resolves once the server is available (I want to use this in a CLI tool).
Edit: whoops, just saw that someone already submitted PR #2 for that 🙈