From 864a1d2a22580a33b5e928734fd256c2133fb672 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Sat, 3 Jan 2026 00:26:51 +0000 Subject: Adds camera streaming to frontend --- hsm-web/Main.hs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'hsm-web/Main.hs') diff --git a/hsm-web/Main.hs b/hsm-web/Main.hs index 0ec780e..0eb5237 100644 --- a/hsm-web/Main.hs +++ b/hsm-web/Main.hs @@ -1,20 +1,33 @@ +{-# LANGUAGE OverloadedRecordDot #-} {-# LANGUAGE TemplateHaskell #-} import Data.Function ((&)) import Effectful (runEff) +import Effectful.Concurrent (runConcurrent) +import Effectful.Fail (runFailIO) import Hsm.Core.App (bootstrapAppNoEcho) import Hsm.I2C (runI2C) import Hsm.INA226 (runINA226) import Hsm.Log (Severity (Info), runLogsOpt) import Hsm.Log.Options (makeLoggerOptionParser) +import Hsm.Stream (runStream) import Hsm.Web (runServer, runWeb) -- Import full module for cleaner `-ddump-splices` output -- Avoids package/module qualifiers in generated code import Options.Applicative -type Logs = '["i2c", "ina226", "scotty", "web"] +type Logs = '["gst", "i2c", "ina226", "scotty", "stream", "web"] $(makeLoggerOptionParser @Logs "Options" "parser" 'Info) main :: IO () -main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> runServer & runWeb & runINA226 & runI2C & runLogsOpt @Options @Logs opts & runEff +main = bootstrapAppNoEcho parser "Launch HsMouse Web Server" $ \opts -> + runServer + & runWeb + & runStream + & runINA226 + & runI2C + & runLogsOpt @Options @Logs opts + & runConcurrent + & runFailIO + & runEff -- cgit v1.2.1