diff --git a/src/index.js b/src/index.js index 14d75e7..42c58e4 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,7 @@ import { createServer } from "node:http"; import { publicPath } from "ultraviolet-static"; import { uvPath } from "@titaniumnetwork-dev/ultraviolet"; import { join } from "node:path"; +import { hostname } from "node:os"; const bare = createBareServer("/bare/"); const app = express(); @@ -45,8 +46,13 @@ if (isNaN(port)) port = 8080; server.on("listening", () => { const address = server.address(); + // by default we are listening on 0.0.0.0 (every interface) + // we just need to list a few + console.log("Listening on:"); + console.log(`\thttp://localhost:${address.port}`); + console.log(`\thttp://${hostname()}:${address.port}`); console.log( - `Listening on http://${ + `\thttp://${ address.family === "IPv6" ? `[${address.address}]` : address.address }:${address.port}` );