File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ import Data.Typeable (Typeable)
1010-- The given 'Application' will get the request as received by the server, potentially with
1111-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
1212--
13+ -- To plug a Wai 'Application' directly, you must use `Tagged`:
14+ --
15+ -- >>> type API = "foo" :> Get '[JSON] Int :<|> "bar" :> Raw
16+ -- >>>
17+ -- >>> app :: Application
18+ -- >>> app = ...
19+ -- >>>
20+ -- >>> server :: Server API
21+ -- >>> server = pure 42 :<|> Tagged app
22+ --
1323-- In addition to just letting you plug in your existing WAI 'Application's,
1424-- this can also be used with functions from
1525-- <https://hackage.haskell.org/package/servant-server/docs/Servant-Server-StaticFiles.html Servant.Server.StaticFiles>
You can’t perform that action at this time.
0 commit comments