From 0ec5d1c5d44ea0c52408db9e58e71ea4f133592c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 2 Jun 2020 20:12:21 -0700 Subject: Rename Hero.Database -> Hero.Keep I just like this better. --- Hero/Server.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Hero/Server.hs') 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 -- cgit v1.2.3