Install the OpenSSL on Debian based systems
sudo apt-get install openssl
#Usage: gawk -f web-server | |
BEGIN { | |
RS = ORS = "\r\n" | |
HttpService = "/inet/tcp/8080/0/0" | |
Hello = "<HTML><HEAD>" \ | |
"<TITLE>A Famous Greeting</TITLE></HEAD>" \ | |
"<BODY><H1>Hello, world</H1></BODY></HTML>" | |
Len = length(Hello) + length(ORS) | |
print "HTTP/1.0 200 OK" |& HttpService |