add an example for Raw using serveDirectory
This commit is contained in:
parent
1f3ec7ceaa
commit
e9f2de1162
1 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,13 @@ import Servant.Server
|
||||||
data Raw
|
data Raw
|
||||||
|
|
||||||
-- | Just pass the request to the underlying application and serve its response.
|
-- | Just pass the request to the underlying application and serve its response.
|
||||||
|
--
|
||||||
|
-- Example:
|
||||||
|
--
|
||||||
|
-- > type MyApi = "images" :> Raw
|
||||||
|
-- >
|
||||||
|
-- > server :: Server MyApi
|
||||||
|
-- > server = serveDirectory "/var/www/images"
|
||||||
instance HasServer Raw where
|
instance HasServer Raw where
|
||||||
type Server Raw = Application
|
type Server Raw = Application
|
||||||
route Proxy rawApplication request respond =
|
route Proxy rawApplication request respond =
|
||||||
|
|
Loading…
Add table
Reference in a new issue