feat: add notify command and cli args

This commit is contained in:
qvalentin 2025-01-20 20:40:17 +01:00
parent 92a97e8f8a
commit fd18fa1a8b
10 changed files with 141 additions and 24 deletions

View file

@ -4,10 +4,24 @@ import ClassyPrelude
import GHC.IO.Encoding (setLocaleEncoding)
import GHC.IO.Encoding.UTF8 (utf8)
import Lib (runBothServers)
import Options.Applicative
import Types.Config (ServerOptions, serverOptionsParser)
main :: IO ()
main = do
setLocaleEncoding utf8
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
runBothServers
opts <- execParser serverOptions
runBothServers opts
serverOptions :: ParserInfo ServerOptions
serverOptions =
info
(serverOptionsParser <**> helper)
( fullDesc
<> progDesc "Run the server with specified options"
<> header "Haskell Server - A configurable server application"
)