yesod-media-simple

Simple display of media types, served by yesod https://github.com/mgsloan/yesod-media-simple

Latest on Hackage:0.2.0.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed by Michael Sloan
Maintained by mgsloan@gmail.com

yesod-media-simple

This package provides simple utilities for starting a web server which serves some media. This makes serving media as easy as serve image. For example, here's how you serve a simple diagram:

import Diagrams.Prelude
import Yesod.Media.Simple

main = serveDiagram (circle 10 ||| square 20)

Media Types

Currently yesod-media-simple supports serving the following media types:

  • Diagrams, by using cairo to render to png. Just call serveDiagram :: Diagram Cairo R2 -> IO ()!

  • JuicyPixels images. Also includes utilities for putting JuicyPixels images in Diagrams and vice-versa.

comments powered byDisqus