diff options
-rw-r--r-- | Hero/Keep.hs (renamed from Hero/Database.hs) | 2 | ||||
-rw-r--r-- | Hero/Server.hs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Hero/Database.hs b/Hero/Keep.hs index e3c765c..9ac46fa 100644 --- a/Hero/Database.hs +++ b/Hero/Keep.hs @@ -4,7 +4,7 @@ {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -module Hero.Database +module Hero.Keep ( HeroKeep, GetComics(..), getComics, diff --git a/Hero/Server.hs b/Hero/Server.hs index 73108be..d663c37 100644 --- a/Hero/Server.hs +++ b/Hero/Server.hs @@ -51,7 +51,7 @@ import qualified Data.Text.Lazy.Encoding as Lazy import GHC.Generics import Hero.App import qualified Hero.Assets as Assets -import qualified Hero.Database as Database +import qualified Hero.Keep as Keep import qualified Hero.Look as Look import qualified Hero.Look.Typography as Typography import qualified Lucid as L @@ -79,7 +79,7 @@ main = bracket startup shutdown $ uncurry Warp.run startup = Envy.decodeEnv >>= \case Left e -> Exit.die e Right cfg -> do - keep <- Database.openLocal (heroDataDir cfg) + keep <- Keep.openLocal (heroDataDir cfg) say "hero" say $ "port: " ++ show (heroPort cfg) say $ "client: " ++ heroClient cfg @@ -105,7 +105,7 @@ instance Envy.DefConfig Config where instance Envy.FromEnv Config -app :: AcidState Database.HeroKeep -> Config -> Application +app :: AcidState Keep.HeroKeep -> Config -> Application app keep cfg = serve (Proxy @AllRoutes) @@ -279,8 +279,8 @@ serverHandlers = :<|> discoverHandler :<|> chooseExperienceHandler -jsonHandlers :: AcidState Database.HeroKeep -> Server JsonApi -jsonHandlers keep = Acid.query' keep $ Database.GetComics 10 +jsonHandlers :: AcidState Keep.HeroKeep -> Server JsonApi +jsonHandlers keep = Acid.query' keep $ Keep.GetComics 10 homeHandler :: Handler (HtmlPage (View Action)) homeHandler = pure . HtmlPage . home $ initModel homeLink |