Skip to content

Instantly share code, notes, and snippets.

@TopperBG
Created December 2, 2022 06:24
Show Gist options
  • Save TopperBG/d415d0bd94b3db7ff05f81f5ee84143d to your computer and use it in GitHub Desktop.
Save TopperBG/d415d0bd94b3db7ff05f81f5ee84143d to your computer and use it in GitHub Desktop.
HTTP server in bash oneliner
#!/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