Skip to content

Commit

Permalink
feat: display all listening ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Skye-31 committed Aug 12, 2022
1 parent 810ceda commit 61bb0f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/http-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,11 @@ export async function startServer<Plugins extends HTTPPluginSignatures>(
server.listen(port, host, () => {
const log = mf.log;
const protocol = httpsEnabled ? "https" : "http";
const accessibleHosts = host ? [host] : getAccessibleHosts(true);
log.info(`Listening on ${host ?? ""}:${port}`);
const accessibleHosts = getAccessibleHosts(true).sort();
log.info("Listening on");
if (host) {
log.info(`- ${protocol}://${host}:${port}`);
}
for (const accessibleHost of accessibleHosts) {
log.info(`- ${protocol}://${accessibleHost}:${port}`);
}
Expand Down

0 comments on commit 61bb0f1

Please sign in to comment.