diff options
Diffstat (limited to 'Com/MusicMeetsComics/Server.hs')
-rw-r--r-- | Com/MusicMeetsComics/Server.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |