[Haskell-cafe] web musing

Max Rabkin max.rabkin at gmail.com
Fri Jun 5 11:35:11 EDT 2009


On Fri, Jun 5, 2009 at 5:18 PM, Conor McBride<conor at strictlypositive.org> wrote:
>
> Will I need to ask systems support to let me install some
> haskelly sort of web server? Looks likely, I suppose.
>
> In general, what's an easy way to put a web front end on
> functionality implemented in Haskell?
>

For something this simple, I'd use CGI. I've never used the Haskell
cgi package, but the basic idea is that the webserver runs an
arbitrary script which reads the HTTP request information from
environment variables, and outputs the response (in the simple case,
just "Content-Type: text/html\r\n\r\n"++html). The cgi package
probably provides easy access to those environment variables; this is
what Python's cgi module does, for instance.

--Max


More information about the Haskell-Cafe mailing list