add an example for Raw using serveDirectory

This commit is contained in:
Alp Mestanogullari 2014-11-22 18:06:59 +01:00
parent 1f3ec7ceaa
commit e9f2de1162

View file

@ -26,6 +26,13 @@ import Servant.Server
data Raw
-- | 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
type Server Raw = Application
route Proxy rawApplication request respond =