servant-fiat-content

Use bytestring or text to deliver content directly


Keywords
mit, servant, web, Propose Tags , Servant.HTML.Fiat, Servant.JS.Fiat
License
MIT
Install
cabal install servant-fiat-content-1.0.1

Documentation

Servant fiat content

Sometimes you want to have a plain text just be an HTML content type response, for example when you use a reflex to generate HTML, you have to use IO: https://hackage.haskell.org/package/reflex-dom-core-0.4/docs/Reflex-Dom-Builder-Static.html#v:renderStatic

Or a plain text be a Javascript, when you generate javascript clients in servant and want them to always be up to date with the running server (no filesystem BS): http://hackage.haskell.org/package/servant-js-0.9.4/docs/Servant-JS.html#v:jsForAPI

Fear not! we can do this rather trivially, shown by this module.