on master help sign in
add an example for Raw using serveDirectory
e9f2de1Alp Mestanogullari
src/Servant/API/Raw.hs+7
@@ -26,6 +26,13 @@ import Servant.Server
26data Raw
26data Raw
27
27
28-- | Just pass the request to the underlying application and serve its response.
28-- | 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"
29instance HasServer Raw where
36instance HasServer Raw where
30 type Server Raw = Application
37 type Server Raw = Application
31 route Proxy rawApplication request respond =
38 route Proxy rawApplication request respond =