feat: add notify command and cli args
This commit is contained in:
parent
92a97e8f8a
commit
fd18fa1a8b
10 changed files with 141 additions and 24 deletions
|
@ -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"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue