Safe Haskell | None |
---|---|
Language | Haskell2010 |
- addGET :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m ()
- addPOST :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m ()
- addPUT :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m ()
- addDELETE :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m ()
- addSite :: Text -> Site url (WhebHandlerT g s m) -> InitM g s m ()
- addRoute :: Route g s m -> InitM g s m ()
- addRoutes :: [Route g s m] -> InitM g s m ()
- catchAll :: WhebHandlerT g s m -> InitM g s m ()
- addWhebSocket :: UrlPat -> WhebSocket g s m -> InitM g s m ()
- addWAIMiddleware :: Middleware -> InitM g s m ()
- addWhebMiddleware :: WhebMiddleware g s m -> InitM g s m ()
- addSetting :: Text -> Text -> InitM g s m ()
- addSetting' :: Typeable a => Text -> a -> InitM g s m ()
- addSettings :: CSettings -> InitM g s m ()
- readSettingsFile :: FilePath -> InitM g s m ()
- addCleanupHook :: IO () -> InitM g s m ()
- generateOptions :: MonadIO m => InitM g s m (g, s) -> IO (WhebOptions g s m)
- genMinOpts :: InitM () () IO () -> IO MinOpts
Routes
Named routes convenience functions
addGET :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m () Source
addPOST :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m () Source
addPUT :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m () Source
addDELETE :: Text -> UrlPat -> WhebHandlerT g s m -> InitM g s m () Source
Sites
addSite :: Text -> Site url (WhebHandlerT g s m) -> InitM g s m () Source
Add raw routes
catchAll :: WhebHandlerT g s m -> InitM g s m () Source
Catch all requests regardless of method or path
Sockets
addWhebSocket :: UrlPat -> WhebSocket g s m -> InitM g s m () Source
Middlewares
addWAIMiddleware :: Middleware -> InitM g s m () Source
Add generic WAI middleware
addWhebMiddleware :: WhebMiddleware g s m -> InitM g s m () Source
Add Wheb specific middleware
Settings
addSetting :: Text -> Text -> InitM g s m () Source
Wrapped addSetting'
to help prevent monomorphism errors for simple settings.
addSetting' :: Typeable a => Text -> a -> InitM g s m () Source
Adds a setting value, replacing it if its key already exists.
addSettings :: CSettings -> InitM g s m () Source
readSettingsFile :: FilePath -> InitM g s m () Source
Cleanup
addCleanupHook :: IO () -> InitM g s m () Source
IO Actions to run after server has been stopped.
Running
generateOptions :: MonadIO m => InitM g s m (g, s) -> IO (WhebOptions g s m) Source
Generate WhebOptions
from InitM
in IO