module Main (main) where 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 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" )