Name: servant-blaze
Owner: servant
Description: null
Created: 2016-05-13 07:23:19.0
Updated: 2018-03-22 11:23:56.0
Pushed: 2018-03-22 11:23:55.0
Homepage: null
Size: 24
Language: Haskell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This package allows you to use blaze-html to serve html pages in your servant APIs. More specifically, it exports a HTML
datatype with the correct MimeRender
instances so that you can write type API = Get '[HTML] User
for example.
LANGUAGE OverloadedStrings, DataKinds #-}
le Test where
rt Servant
rt Servant.HTML.Blaze
rt qualified Text.Blaze.Html5 as H
API = Get '[HTML] Homepage
Homepage = H.Html
er :: Server API
er = return myHome
me :: Homepage
me = H.docTypeHtml $ do
H.head $ do
H.title "Live to serve"
H.body $ do
H.h1 "Templates!"
H.p "This will be type-checked, rendered and served"