httpd.lol/README.md

51 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2014-05-05 15:13:27 +00:00
httpd.lol
=========
2014-05-05 15:35:42 +00:00
A minimal HTTP server written in [LOLCODE](http://lolcode.org). Because programming languages.
2014-05-05 15:29:22 +00:00
Usage
-----
Check out and build the future branch of [lci](https://github.com/justinmeza/lci/tree/future).
$ ./lci httpd.lol
2014-05-05 15:34:08 +00:00
point your favorite HTTP-getter to http://127.0.0.1:13337/lol.html
2014-05-05 15:29:22 +00:00
...
profit?
Example
-------
Here we're using Netcat, but browsers work just fine as well.
$ ./lci httpd.lol &
$ echo "GET /lol.html HTTP/1.1" | nc 127.0.0.1 13337
CMD IZ GET /lol.html HTTP/1.1
FIEL IZ lol.html
FIEL FOUND!
LEN IZ 74
DATA IZ <html>
<body><h1><blink>HAI, INTERWEBZ!!!1!!~</blink></h1></body>
</html>
REPLY IZ HTTP/1.1 200 OK
Server: httpd.lol/0.1 (lci)
Context-Type: text/html
Content-Length: 74
<html>
<body><h1><blink>HAI, INTERWEBZ!!!1!!~</blink></h1></body>
</html>
HTTP/1.1 200 OK
Server: httpd.lol/0.1 (lci)
Context-Type: text/html
Content-Length: 74
<html>
<body><h1><blink>HAI, INTERWEBZ!!!1!!~</blink></h1></body>
</html>