diff options
author | EuAndreh <eu@euandre.org> | 2022-12-02 20:52:59 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-12-02 20:52:59 -0300 |
commit | 9bf50b58674e02a717241577d79c727b75bb01a3 (patch) | |
tree | 85a0a25ad273c6c73555161f90ee34b5d9dee860 /bin | |
parent | bin/serve: Do not wait for the browser before start listening (diff) | |
download | dotfiles-9bf50b58674e02a717241577d79c727b75bb01a3.tar.gz dotfiles-9bf50b58674e02a717241577d79c727b75bb01a3.tar.xz |
bin/serve: Find a port instead of having a hard-coded fallback
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/serve | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |