Help! Can you run Happstack as a CGI?

Sep 02, 2009 07:41

Does anyone already have code for running a Happstack app as a CGi instead of a HTTP Server?

Searching for a CGI adapter or backend to Happstack, I didn't find anything. The documentation mentions you can do it... but it isn't clear if it works out of the box.

I was able to find the happstack-fastcgi package. For fun, I tried converting my app to ( Read more... )

happstack, haskell, haskwhal

Leave a comment

Comments 1

anonymous December 27 2009, 04:34:50 UTC
Don't use the FCGI hooks.

Just compile your application, and throw the binary in your CGI directory. CGI isn't special. It just feeds HTTP requests to an application via some environment variables.

Probably a bad idea though. You will need to make sure that each instance is single threaded and that there can't be race conditions in your state.

Reply


Leave a comment

Up