diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-02-10 02:55:48 +0000 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-02-10 02:55:48 +0000 |
| commit | 39c4a5f7ad2a7cffe5227d20ed7485845911c905 (patch) | |
| tree | 3231d32e3c90ff3740a1793b61319c7091f3b34e /hsm-web/Hsm | |
| parent | e7143436a334f364a6ae8866eb3fb31a259ff90c (diff) | |
Adds deployment support
Diffstat (limited to 'hsm-web/Hsm')
| -rw-r--r-- | hsm-web/Hsm/Web.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hsm-web/Hsm/Web.hs b/hsm-web/Hsm/Web.hs index a99ba5b..79e007d 100644 --- a/hsm-web/Hsm/Web.hs +++ b/hsm-web/Hsm/Web.hs @@ -19,6 +19,7 @@ import Effectful.Dispatch.Static , getStaticRep , unEff , unsafeEff + , unsafeEff_ ) import Effectful.Dispatch.Static.Primitive (Env) import Effectful.Exception (finally) @@ -109,8 +110,10 @@ runServer runServer = finally startServer stopServer where startServer = do + dist <- unsafeEff_ $ getDataFileName "Client/dist/" Web options <- getStaticRep logMsg @"web" Info "Starting scotty web server" + logMsg @"web" Info $ "Serving static files from: " <> dist unsafeEff $ server options stopServer = logMsg @"web" Info "Stopping scotty web server" |
