summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.envrc2
-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.hs2
-rw-r--r--Hero/Node.hs (renamed from Hero/Client.hs)4
-rw-r--r--Hero/Service.nix6
-rw-r--r--default.nix8
7 files changed, 18 insertions, 18 deletions
diff --git a/.envrc b/.envrc
index 346588d..dca006f 100644
--- a/.envrc
+++ b/.envrc
@@ -2,7 +2,7 @@ PATH_add $PWD
export BIZ_ROOT=$PWD
export HERO_PORT=3000
-export HERO_BEAM=$BIZ_ROOT/_bild/Hero.Client/static
+export HERO_NODE=$BIZ_ROOT/_bild/Hero.Node/static
export HERO_KEEP=$BIZ_ROOT/_keep
export HERO_SKEY=$BIZ_ROOT/_skey
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"
diff --git a/default.nix b/default.nix
index 237a6da..5d2021b 100644
--- a/default.nix
+++ b/default.nix
@@ -73,8 +73,8 @@ in rec {
services.herocomics = {
enable = true;
port = 3000;
- deck = Hero.Server;
- beam = Hero.Client;
+ host = Hero.Host;
+ node = Hero.Node;
keep = "/var/lib/hero";
};
};
@@ -82,8 +82,8 @@ in rec {
#
Biz.Ibb.Server = build.ghc Biz/Ibb/Server.hs;
Biz.Ibb.Client = build.ghcjs Biz/Ibb/Client.hs;
- Hero.Server = build.ghc Hero/Server.hs;
- Hero.Client = build.ghcjs Hero/Client.hs;
+ Hero.Host = build.ghc Hero/Host.hs;
+ Hero.Node = build.ghcjs Hero/Node.hs;
Que.Server = build.ghc ./Que/Server.hs;
Que.Website = build.ghc ./Que/Website.hs;
# Development environment