blob: 2b6c44bd7d61d41cebd4c3501cb9347bae8b616a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{-# LANGUAGE TemplateHaskell #-}
import Effectful (runEff)
import Hsm.Cam (runCam)
import Hsm.Core.App (runApp)
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 = runApp parser "Launch HsMouse Web Server" $ \opts -> runLogsOpt @Options @Loggers opts . runCam . runWeb $ runServer
|