summaryrefslogtreecommitdiff
path: root/fig-frontend/src/Fig/Frontend/Utils.hs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-03-19 03:37:33 -0400
committerLLLL Colonq <llll@colonq>2024-03-19 03:37:33 -0400
commitfbabf1d29a8a97d57d9609666c81701fe12979e1 (patch)
treec9e7f4c0185dedf084558aeeea69140a326a19ef /fig-frontend/src/Fig/Frontend/Utils.hs
parent7aa60d33eff21ccdaa31ccd5dd64196990bb3dea (diff)
Update
Diffstat (limited to 'fig-frontend/src/Fig/Frontend/Utils.hs')
-rw-r--r--fig-frontend/src/Fig/Frontend/Utils.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/fig-frontend/src/Fig/Frontend/Utils.hs b/fig-frontend/src/Fig/Frontend/Utils.hs
index 20234e7..3081ddb 100644
--- a/fig-frontend/src/Fig/Frontend/Utils.hs
+++ b/fig-frontend/src/Fig/Frontend/Utils.hs
@@ -19,10 +19,11 @@ newtype FigFrontendException = FigFrontendException Text
instance Exception FigFrontendException
data Config = Config
- { port :: Int
- , assetPath :: FilePath
- , clientId :: Text
- , authToken :: Text
+ { port :: !Int
+ , assetPath :: !FilePath
+ , clientId :: !Text
+ , authToken :: !Text
+ , dbHost :: !Text
} deriving (Show, Eq, Ord)
configCodec :: Toml.TomlCodec Config
@@ -31,6 +32,7 @@ configCodec = do
assetPath <- Toml.string "asset_path" Toml..= (\a -> a.assetPath)
clientId <- Toml.text "client_id" Toml..= (\a -> a.clientId)
authToken <- Toml.text "auth_token" Toml..= (\a -> a.authToken)
+ dbHost <- Toml.text "db_host" Toml..= (\a -> a.dbHost)
pure $ Config{..}
loadConfig :: FilePath -> IO Config