$ cabal install yesod
$ runhaskell helloworld.hs
Created
August 12, 2014 23:16
-
-
Save bitmaybewise/18af1132d1e75aa4846b to your computer and use it in GitHub Desktop.
Yesod HelloWorld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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