bin/serve

8 lines
149 B
Bash
Executable file

#!/bin/bash
PORT="${1:-8080}"
if which python >= /dev/null 2>&1; then
python -m SimpleHTTPServer $PORT
else
python3 -m http.server $PORT
fi