Skip to content

Instantly share code, notes, and snippets.

@saii9
Created June 5, 2020 04:22
Show Gist options
  • Save saii9/1a357189ae7188faf4ea15eb6501ff1c to your computer and use it in GitHub Desktop.
Save saii9/1a357189ae7188faf4ea15eb6501ff1c to your computer and use it in GitHub Desktop.
steps to star as static http server
cat > start.sh
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; sh server.sh; } | nc -l 8081; done
cat > server.sh
#!/bin/bash
response=`cat response.json`
echo "$response"
cat > response.json
Hello World
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment