michael at snoyman.com
Fri Apr 2 18:51:54 EDT 2010
web-routes-quasi is now at the point where it can be used for sites, and I'd
love to hear some feedback. I've put together a little sample that
demonstrates how you can use quasi-quoting and define your routes, embed
subsites and serve the resulting application via WAI. (My example uses WAI,
but the package itself is not tied to WAI.)
The code is on github; the main function for the blog is in blog.hs (with
the lowercase b). I believe this just depends on Jeremy's web-routes
package, wai and wai-extra.
Note that I did not use web-routes-wai; I think there are some problems in
there for breaking up the pathinfo, and I didn't have time to dig through
it. Also, this package currently ignores entirely the defaultPage component
of Site, though if there is desire support can be added for it.
One minor bug is that you can't have an alternate GET, POST, PUT or DELETE
constructor imported; hopefully that will get cleaned up.
Any comments and suggestions are welcome! My goal is to port Yesod over to
this as soon as the web-routes set of packages are released, so if you're
interested in Yesod, you should be interested in this too ;).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the web-devel