summaryrefslogtreecommitdiff
path: root/servelocal.sh
blob: 84aaea677522ebe5453d61cf1754184e0c17a6e5 (plain)
1
2
3
4
5
6
7
8
9
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