summaryrefslogtreecommitdiff
path: root/cgi/index.hs
blob: c01e79d54f582c2f6060ea4b9dd080d16f9c7d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE OverloadedStrings #-}

import Settlr.Storage
import Network.CGI (runCGI, handleErrors, CGIResult, CGI, outputFPS)
import Text.Blaze.Html5 (Html, (!))
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
import Text.Blaze.Html.Renderer.Utf8 (renderHtml)

page :: Html
page = H.docTypeHtml $ do
         H.head $ do
           H.title "Test"
           H.meta ! A.charset "utf-8"
         H.body $ do
           H.p "Hello, world!"

cgiMain :: CGI CGIResult
cgiMain = outputFPS $ renderHtml page

main :: IO ()
main = runCGI (handleErrors cgiMain)