From e9f2de1162ebfea179400e28c3ea5cfd927c0f95 Mon Sep 17 00:00:00 2001 From: Alp Mestanogullari Date: Sat, 22 Nov 2014 18:06:59 +0100 Subject: [PATCH] add an example for Raw using serveDirectory --- src/Servant/API/Raw.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Servant/API/Raw.hs b/src/Servant/API/Raw.hs index 72f43cbc..69afb687 100644 --- a/src/Servant/API/Raw.hs +++ b/src/Servant/API/Raw.hs @@ -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 =