Webanwendung mit FastCGI und Haskell
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
492B

  1. {-# LANGUAGE OverloadedStrings #-}
  2. module App.Startpage (
  3. Startpage(..)
  4. ) where
  5. import Text.XHtml
  6. import Control.Monad.State (gets)
  7. import Request
  8. import Template
  9. import Network.FastCGI
  10. import AppMonad (numVisited)
  11. data Startpage = Startpage
  12. instance RequestHandler Startpage where
  13. handle handler = do
  14. n <- gets numVisited
  15. result <- render "startpage" [("pagetitle", "Startseite"),
  16. ("visited", show n)]
  17. output result