Created
December 2, 2022 06:24
-
-
Save TopperBG/d415d0bd94b3db7ff05f81f5ee84143d to your computer and use it in GitHub Desktop.
HTTP server in bash oneliner
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
#!/bin/bash | |
while true; do echo -e "HTTP/1.1 200 OK\n\n$($1)" | nc -l -k -p 8080 -q 1; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment