From 9bf50b58674e02a717241577d79c727b75bb01a3 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 2 Dec 2022 20:52:59 -0300 Subject: bin/serve: Find a port instead of having a hard-coded fallback --- bin/serve | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/serve') diff --git a/bin/serve b/bin/serve index e2a1009..82a0663 100755 --- a/bin/serve +++ b/bin/serve @@ -15,7 +15,7 @@ help() { Options: -d DIRECTORY the directory to serve (default: ".") - -p PORT the port to listen on (default: 8000) + -p PORT the port to listen on (default: find one) -h, --help show this message @@ -53,7 +53,7 @@ for flag in "$@"; do done DIRECTORY='.' -PORT=8000 +PORT="$(free-port)" while getopts 'd:p:h' flag; do case "$flag" in d) -- cgit v1.2.3