notes/scripts/nc_play/nk
2022-12-16 19:45:33 -08:00

13 lines
173 B
Bash
Executable file

#!/usr/bin/env bash
servefile="$1"
port="$2"
main() {
while :
do
echo -e "HTTP/1.1 200 OK\n\n$(cat "$servefile")" | nc -l -p "$port" -q 1
done
}
main