Skip to content

Instantly share code, notes, and snippets.

@henriquegogo
Created June 30, 2025 13:40
Show Gist options
  • Save henriquegogo/1bc49f66e24b7b7a84e8e9baa9803800 to your computer and use it in GitHub Desktop.
Save henriquegogo/1bc49f66e24b7b7a84e8e9baa9803800 to your computer and use it in GitHub Desktop.
Shell Web Server
#!/bin/sh
port=8000
echo "Starting server on port $port..."
while true; do
echo "HTTP/1.1 200 OK
Content-Type: text/plain
Hello World" | nc -l -p $port -q 0
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment