diff options
Diffstat (limited to 'servelocal.sh')
| -rwxr-xr-x | servelocal.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/servelocal.sh b/servelocal.sh new file mode 100755 index 0000000..84aaea6 --- /dev/null +++ b/servelocal.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# servelocal.sh +# Quick script to host on localhost for testing. + +# If we have no arguments, or the port argument is not a positive integer (drop failure output). +if [ $# -eq 0 ] || ! [ $1 -gt 0 ] 2>/dev/null; then + echo "usage: servelocal.sh <port>" +else + python3 -m http.server $1 +fi |
