notes/scripts/nk
2022-12-16 16:15:39 -08:00

9 lines
217 B
Bash
Executable file

#!/usr/bin/env bash
servefile="$1"
while :
do
# echo -e "HTTP/1.1 200 OK\n\n$(echo '<h1>Hi there</h1>')" | nc -l -k -p 8080 -q 1
echo -e "HTTP/1.1 200 OK\n\n$(cat "$servefile")" | nc -l -k -p 8080 -q 1
done