[Haskell-beginners] Simple warp-based server

Michael Xavier nemesisdesign at gmail.com
Thu Jun 9 17:45:41 CEST 2011


Hi Haskell Beginners,

I am writing a fairly simple app in haskell that will be used to support
some Ruby on Rails apps at work. The gist of it is that it takes a JSON
request and produces a JSON response. I've figured that strapping it to a
web server will be the easiest way to allow our Rails apps to talk to it
without worrying about IPC and all of that. I looked at yesod and snap and
both seemed to be too much for what I'm asking. It seems to me that the best
approach would be to write up an WAI interface, strap it to a Warp server
and call it a day.

1) Is my reasoning about the approach to take sound or is there an
alternative I haven't considered? My app will have 1 path (or rather won't
care about the request path) and will take its input by just reading the
request body.

2) Could anyone recommend what I need to read to take this approach? I
started looking at Warp and WAI documentation and found I was well over my
head as I have no knowledge of Iterators/Iteratees/Enumerators nor Builders,
but I'm definitely willing to learn if that's what it takes.

-- 
Michael Xavier
http://www.michaelxavier.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110609/b67960f7/attachment.htm>


More information about the Beginners mailing list