📝 Scripts on nc and websockets
This commit is contained in:
parent
335af55be5
commit
58a1590583
3 changed files with 70 additions and 6 deletions
9
scripts/nk
Executable file
9
scripts/nk
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue