Created
June 5, 2020 04:22
-
-
Save saii9/1a357189ae7188faf4ea15eb6501ff1c to your computer and use it in GitHub Desktop.
steps to star as static http server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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