Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: a9b10ce0bc
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (19 sloc) 0.534 kB
{-# LANGUAGE QuasiQuotes, TypeFamilies, MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
import Yesod.Static
import Yesod.Dispatch
import Yesod.Core
import Network.Wai.Handler.Warp (run)
staticFiles "."
data Sample = Sample
getStatic _ = $(embed "tests")
mkYesod "Sample" [parseRoutes|
/ RootR GET
/static StaticR Static getStatic
|]
instance Yesod Sample where approot _ = ""
getRootR = do
redirectText RedirectPermanent "static"
return ()
main = toWaiApp Sample >>= run 3000
Jump to Line
Something went wrong with that request. Please try again.