summaryrefslogtreecommitdiff
path: root/Com/MusicMeetsComics/Server/Init.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-10 16:33:00 -0700
committerBen Sima <ben@bsima.me>2020-04-10 18:23:38 -0700
commit61e21346a6947327bf5394f6c73499621c494986 (patch)
treeeeb9d3525137e09ee482710b651ab2c004c2cee6 /Com/MusicMeetsComics/Server/Init.hs
parent2263381b305092390984561855856ab725561cf6 (diff)
Deploy herocomics.app production server
This also includes some drive-by formatting changes and config changes needed to get it up and running.
Diffstat (limited to 'Com/MusicMeetsComics/Server/Init.hs')
-rw-r--r--Com/MusicMeetsComics/Server/Init.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Com/MusicMeetsComics/Server/Init.hs b/Com/MusicMeetsComics/Server/Init.hs
index 7ad3ebf..04ddc88 100644
--- a/Com/MusicMeetsComics/Server/Init.hs
+++ b/Com/MusicMeetsComics/Server/Init.hs
@@ -18,7 +18,7 @@ import qualified System.IO as IO
-- | An action that creates a WAI 'Application' together with its resources,
-- runs it, and tears it down on exit
runApp :: (Config.Config -> Application) -> IO ()
-runApp app = bracket Config.acquire shutdownApp jog
+runApp app = bracket Config.acquire shutdown jog
where
say = IO.hPutStrLn IO.stderr
jog config = do
@@ -39,8 +39,8 @@ compress :: Middleware
compress = gzip def { gzipFiles = GzipCompress }
-- | Takes care of cleaning up 'Config.Config' resources
-shutdownApp :: Config.Config -> IO ()
-shutdownApp cfg = do
+shutdown :: Config.Config -> IO ()
+shutdown cfg = do
_ <- Katip.closeScribes (Config.configLogEnv cfg)
-- Monad.Metrics does not provide a function to destroy metrics store
-- so, it'll hopefully get torn down when async exception gets thrown