Safe Haskell | Safe-Infered |
---|
- static :: Middleware
- staticRoot :: Text -> Middleware
- staticList :: [(Text, Text)] -> Middleware
Documentation
Serve static files out of the application root (current directory). If file is found, it is streamed to the client and no further middleware is run.
staticRoot :: Text -> MiddlewareSource
Like static
, but only looks for static files in the given directory.
Supplied path may be relative or absolute and is prepended to the requested path.
static = staticRoot ""
staticList :: [(Text, Text)] -> MiddlewareSource
Serve only the files given in an association list. Key is the URI, Value is the filesystem path.