add an example for Raw using serveDirectory
commite9f2de1162ebfea179400e28c3ea5cfd927c0f95
authorAlp Mestanogullari <alpmestan@gmail.com>
dateSat 22 Nov 2014, 18:06 (12 years ago)
parent1f3ec7c
src/Servant/API/Raw.hs+7
@@ -26,6 +26,13 @@ import Servant.Server
2626data Raw
2727
2828-- | Just pass the request to the underlying application and serve its response.
29+--
30+-- Example:
31+--
32+-- > type MyApi = "images" :> Raw
33+-- >
34+-- > server :: Server MyApi
35+-- > server = serveDirectory "/var/www/images"
2936instance HasServer Raw where
3037 type Server Raw = Application
3138 route Proxy rawApplication request respond =