@@ -18,7 +18,7 @@ import Test.Hspec.Wai (get, shouldRespondWith, with)
18import Servant.API ((:<|>) ((:<|>)), Capture, Get, Raw, (:>), JSON)
18import Servant.API ((:<|>) ((:<|>)), Capture, Get, Raw, (:>), JSON)
19import Servant.Server (Server, serve)
19import Servant.Server (Server, serve)
20import Servant.ServerSpec (Person (Person))
20import Servant.ServerSpec (Person (Person))
21−import Servant.Utils.StaticFiles (serveDirectory)
21+import Servant.Utils.StaticFiles (serveDirectoryFileServer)
24 "dummy_api" :> Capture "person_name" String :> Get '[JSON] Person
24 "dummy_api" :> Capture "person_name" String :> Get '[JSON] Person
@@ -34,7 +34,7 @@ app = serve api server
34server :: Server Api
34server :: Server Api
36 (\ name_ -> return (Person name_ 42))
36 (\ name_ -> return (Person name_ 42))
37− :<|> serveDirectory "static"
37+ :<|> serveDirectoryFileServer "static"
39withStaticFiles :: IO () -> IO ()
39withStaticFiles :: IO () -> IO ()
40withStaticFiles action = withSystemTempDirectory "servant-test" $ \ tmpDir ->
40withStaticFiles action = withSystemTempDirectory "servant-test" $ \ tmpDir ->