Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (34 sloc) 1.148 kb
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Minimal where
import Yesod
import Network.Wai.Handler.Warp (run)
data Minimal = Minimal
mkYesod "Minimal" [parseRoutes|
/ RootR GET
instance Yesod Minimal where
defaultLayout widget = do
pc <- widgetToPageContent widget
hamletToRepHtml [hamlet|
\<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>#{pageTitle pc}
<meta name="description" content="my awesome site">
<meta name="author" content="Patrick Brisbin">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
^{pageHead pc}
^{pageBody pc}
getRootR :: Handler RepHtml
getRootR = defaultLayout $ do
setTitle "My title"
[whamlet|<p>Hello world|]
main :: IO ()
main = run 3000 =<< toWaiApp Minimal
Jump to Line
Something went wrong with that request. Please try again.