Safe Haskell | None |
---|---|
Language | Haskell2010 |
Handlers for serving static resources
Synopsis
- serveDir :: (MonadIO m, Handler h m, Sets h [Status, RequiredHeader "Content-Type" MimeType, Body ByteString] Response) => FilePath -> Maybe FilePath -> h (Linked req Request) Response
- serveFile :: (MonadIO m, Handler h m, Sets h [Status, RequiredHeader "Content-Type" MimeType, Body ByteString] Response) => h FilePath Response
Documentation
:: (MonadIO m, Handler h m, Sets h [Status, RequiredHeader "Content-Type" MimeType, Body ByteString] Response) | |
=> FilePath | The directory to serve |
-> Maybe FilePath | Optional index filename for the root directory. A 404 Not Found
response will be returned for requests to the root path if this
is set to |
-> h (Linked req Request) Response |
Serve files under the specified directory.