diff options
Diffstat (limited to 'hsm-web/Main.hs')
-rw-r--r-- | hsm-web/Main.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hsm-web/Main.hs b/hsm-web/Main.hs new file mode 100644 index 0000000..6cbfa31 --- /dev/null +++ b/hsm-web/Main.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE TemplateHaskell #-} + +import Data.Function ((&)) +import Effectful (runEff) +import Hsm.Cam (runCam) +import Hsm.Core.App (bootstrapAppNoEcho) +import Hsm.Log (Severity (Info), runLogsOpt) +import Hsm.Log.Options (makeLoggerOptionParser) +import Hsm.Web (runServer, runWeb) +-- Import full module for cleaner `-ddump-splices` output +-- Avoids package/module qualifiers in generated code +import Options.Applicative + +type Loggers = '["cam", "libcamera", "scotty", "web"] + +$(makeLoggerOptionParser @Loggers "Options" "parser" 'Info) + +main :: IO () +main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> runServer & runWeb & runCam & runLogsOpt @Options @Loggers opts & runEff |