Skip to content

Instantly share code, notes, and snippets.

@sirenko
Created June 30, 2021 05:13
Show Gist options
  • Save sirenko/6dd1713ca14215acc6ba48f27f136389 to your computer and use it in GitHub Desktop.
Save sirenko/6dd1713ca14215acc6ba48f27f136389 to your computer and use it in GitHub Desktop.
while true; do { echo -e "HTTP/1.0 200 OK\n\n $(date)" | nc -l -p 9090 -c }; done
# One line web-server for Shell (bash, zsh) returning current date and time.
# It's good enough to mimic k8s service.
# The server could be executed in busybox docker image/container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment