summaryrefslogtreecommitdiff
path: root/Com/MusicMeetsComics
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-10 23:39:07 -0700
committerBen Sima <ben@bsima.me>2020-04-11 00:04:47 -0700
commitca7ac04518b57180cd6cb0d46bc12fadeb7406ee (patch)
tree36544daab25a99d58b2661eff42fdf39927fd412 /Com/MusicMeetsComics
parent76112b8bd26c0e282d5479ccae9d79c4dc28c35d (diff)
Switch que-server to envy
Diffstat (limited to 'Com/MusicMeetsComics')
-rw-r--r--Com/MusicMeetsComics/Server.hs6
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