diff options
Diffstat (limited to 'Hero')
-rw-r--r-- | Hero/Core.hs (renamed from Hero/App.hs) | 2 | ||||
-rw-r--r-- | Hero/Host.hs (renamed from Hero/Server.hs) | 12 | ||||
-rw-r--r-- | Hero/Keep.hs | 2 | ||||
-rw-r--r-- | Hero/Node.hs (renamed from Hero/Client.hs) | 4 | ||||
-rw-r--r-- | Hero/Service.nix | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/Hero/App.hs b/Hero/Core.hs index 6f7a8c4..c11456d 100644 --- a/Hero/App.hs +++ b/Hero/Core.hs @@ -10,7 +10,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} -module Hero.App where +module Hero.Core where import Alpha import qualified Clay diff --git a/Hero/Server.hs b/Hero/Host.hs index cdf89d0..fc31c39 100644 --- a/Hero/Server.hs +++ b/Hero/Host.hs @@ -47,7 +47,7 @@ -- : dep wai-middleware-metrics -- : dep warp -- : dep x509 -module Hero.Server +module Hero.Host ( main, ) where @@ -61,7 +61,7 @@ import qualified Data.Acid.Abstract as Acid import qualified Data.Aeson as Aeson import Data.Text (Text) import qualified Data.Text.Lazy as Lazy -import Hero.App +import Hero.Core import qualified Hero.Assets as Assets import qualified Hero.Keep as Keep import qualified Hero.Look as Look @@ -94,14 +94,14 @@ main = bracket startup shutdown run skey <- upsertKey (heroSkey cfg) say "hero" prn $ "port: " ++ show (heroPort cfg) - prn $ "beam: " ++ heroBeam cfg prn $ "keep: " ++ heroKeep cfg + prn $ "node: " ++ heroNode cfg prn $ "skey: " ++ heroSkey cfg let jwts = Auth.defaultJWTSettings skey cs = Auth.defaultCookieSettings ctx = cs :. jwts :. EmptyContext proxy = Proxy @(AllRoutes '[Auth.JWT]) - static = serveDirectoryWith $ defaultWebAppSettings $ heroBeam cfg + static = serveDirectoryWith $ defaultWebAppSettings $ heroNode cfg server = -- assets, auth, and the homepage is public static @@ -151,14 +151,14 @@ type App = (Config, Application, AcidState Keep.HeroKeep) data Config = Config { heroPort :: Warp.Port, - heroBeam :: FilePath, + heroNode :: FilePath, heroKeep :: FilePath, heroSkey :: FilePath } deriving (Generic, Show) instance Envy.DefConfig Config where - defConfig = Config 3000 "_bild/Hero.Client/static" "_keep" "/run/hero/skey" + defConfig = Config 3000 "_bild/Hero.Node/static" "_keep" "/run/hero/skey" instance Envy.FromEnv Config diff --git a/Hero/Keep.hs b/Hero/Keep.hs index ee625d8..72bd6c2 100644 --- a/Hero/Keep.hs +++ b/Hero/Keep.hs @@ -23,7 +23,7 @@ import qualified Data.IxSet as IxSet import Data.IxSet (Indexable (..), IxSet, ixFun, ixSet) import Data.SafeCopy (base, deriveSafeCopy) import qualified Data.Text as Text -import Hero.App +import Hero.Core -- * Keep diff --git a/Hero/Client.hs b/Hero/Node.hs index 5429855..e32cd59 100644 --- a/Hero/Client.hs +++ b/Hero/Node.hs @@ -17,7 +17,7 @@ -- : dep string-quote -- : dep text -- : dep ghcjs-base -module Hero.Client where +module Hero.Node where import Alpha import Biz.Auth as Auth @@ -25,7 +25,7 @@ import qualified Data.Aeson as Aeson import qualified Data.Set as Set import qualified GHC.Show as Legacy import GHCJS.Types (JSVal) -import Hero.App +import Hero.Core ( Action (..), AudioState (..), Comic (..), diff --git a/Hero/Service.nix b/Hero/Service.nix index 89c6907..5885d1c 100644 --- a/Hero/Service.nix +++ b/Hero/Service.nix @@ -23,11 +23,11 @@ in default = "/var/lib/hero"; description = "herocomics-server database directory"; }; - deck = lib.mkOption { + host = lib.mkOption { type = lib.types.package; description = "herocomics-server package to use"; }; - beam = lib.mkOption { + node = lib.mkOption { type = lib.types.package; description = "herocomics-client package to use"; }; @@ -58,7 +58,7 @@ in serviceConfig = { KillSignal = "INT"; Environment = [ - "HERO_BEAM=${cfg.beam}/static" + "HERO_NODE=${cfg.node}/static" "HERO_PORT=${toString cfg.port}" "HERO_KEEP=${cfg.keep}" "HERO_SKEY=/run/hero/skey" |