13 lines
173 B
Bash
Executable file
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
|