Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (19 sloc) 580 Bytes
module Route where
import Control.Monad
import Happstack.Auth
import Happstack.Server hiding (timeout)
import Demo
appRoute :: ServerPartT IO Response
appRoute = updateTimeout timeout >> msum
[ dir "happstack-auth" $ msum
[ nullDir >> demoHome
, dir' "register" demoRegister
, dir' "login" demoLogin
, dir' "logout" demoLogout
, dir' "stats" demoStats
, serveDirectory EnableBrowsing [] "."
]
, nullDir >> seeOther "/happstack-auth" (toResponse "")
]
where
dir' p r = dir p (nullDir >> r)