From ca7ac04518b57180cd6cb0d46bc12fadeb7406ee Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 10 Apr 2020 23:39:07 -0700 Subject: Switch que-server to envy --- Com/MusicMeetsComics/Server.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Com/MusicMeetsComics/Server.hs') diff --git a/Com/MusicMeetsComics/Server.hs b/Com/MusicMeetsComics/Server.hs index a1a9981..c173bd3 100644 --- a/Com/MusicMeetsComics/Server.hs +++ b/Com/MusicMeetsComics/Server.hs @@ -71,7 +71,7 @@ import qualified System.IO as IO main :: IO () -main = bracket startup shutdown run +main = bracket startup shutdown $ uncurry Warp.run where say = IO.hPutStrLn IO.stderr startup = Envy.decodeEnv >>= \case @@ -81,10 +81,10 @@ main = bracket startup shutdown run say $ "hero" say $ "port: " ++ (show $ heroPort c) say $ "client: " ++ heroClient c - return (db, c) + let waiapp = app db c + return (heroPort c, waiapp) shutdown :: a -> IO a shutdown = pure . identity - run (db, config) = Warp.run (heroPort config) (app db config) data Config = Config { heroPort :: Warp.Port -- ^ HERO_PORT -- cgit v1.2.3