@@ -18,7 +18,7 @@ import Test.Hspec.Wai (get, shouldRespondWith, with)
1818import Servant.API ((:<|>) ((:<|>)), Capture, Get, Raw, (:>), JSON)
1919import Servant.Server (Server, serve)
2020import Servant.ServerSpec (Person (Person))
21−import Servant.Utils.StaticFiles (serveDirectory)
21+import Servant.Utils.StaticFiles (serveDirectoryFileServer)
2222
2323type Api =
2424 "dummy_api" :> Capture "person_name" String :> Get '[JSON] Person
@@ -34,7 +34,7 @@ app = serve api server
3434server :: Server Api
3535server =
3636 (\ name_ -> return (Person name_ 42))
37− :<|> serveDirectory "static"
37+ :<|> serveDirectoryFileServer "static"
3838
3939withStaticFiles :: IO () -> IO ()
4040withStaticFiles action = withSystemTempDirectory "servant-test" $ \ tmpDir ->