Skip to content

Instantly share code, notes, and snippets.

@bitmaybewise
Created August 12, 2014 23:16
Show Gist options
  • Save bitmaybewise/18af1132d1e75aa4846b to your computer and use it in GitHub Desktop.
Save bitmaybewise/18af1132d1e75aa4846b to your computer and use it in GitHub Desktop.
Yesod HelloWorld

Yesod HelloWorld

$ cabal install yesod
$ runhaskell helloworld.hs
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
import Yesod
data HelloWorld = HelloWorld
mkYesod "HelloWorld" [parseRoutes|
/ HomeR GET
|]
instance Yesod HelloWorld
getHomeR :: Handler Html
getHomeR = defaultLayout [whamlet|Hello World!|]
main :: IO ()
main = warp 3000 HelloWorld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment