myriad/app/Main.hs

27 lines
559 B
Haskell
Raw Normal View History

2019-07-09 11:19:41 +02:00
module Main where
2019-07-11 07:00:41 +02:00
import qualified Data.Text as T
import Options.Applicative
2019-07-09 11:19:41 +02:00
import Myriad
2019-07-09 11:19:41 +02:00
2019-07-11 07:00:41 +02:00
data Args = Args
{ configInput :: T.Text
}
parseArgs :: IO Args
parseArgs = execParser $ info (helper <*> args) (fullDesc <> progDesc "Run the Myriad server")
where
args = Args <$> option str (mconcat
[ long "config"
, short 'c'
, help "Sets the Dhall configuration"
, metavar "DHALL"
])
2019-07-09 11:19:41 +02:00
main :: IO ()
main = do
2019-07-11 07:00:41 +02:00
Args { configInput } <- parseArgs
runMyriadServer configInput