handle arbitrary port for cli

This commit is contained in:
Ruben Fiszel
2023-06-10 00:36:57 +02:00
parent 03dfbe21c2
commit 19d85e164c
+5 -1
View File
@@ -158,7 +158,11 @@ async function dev(opts: GlobalOptions & { filter?: string }) {
});
const port = getPort(3000);
console.log("Started dev server at http://localhost:" + port);
console.log(
"Started dev server at http://localhost:" +
port +
(port == 3000 ? "/" : "/?port=" + port)
);
console.log(
"Dev server will automatically point to the last script edited locally"
);