aboutsummaryrefslogtreecommitdiff
path: root/bin/serve
diff options
context:
space:
mode:
Diffstat (limited to 'bin/serve')
-rwxr-xr-xbin/serve4
1 files changed, 2 insertions, 2 deletions
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)