The first library I did for my compiled experimental PL was a HTTP server, pretty similar to what you describe.
I wonder about the performance and reliability of libraries like those (Go's http package, Ruby Sinatra/WEBrick, etc.); if they can be used in production.
However I too would be interested in reading more about the previous commenter's set up.