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
|
|
|
|
|
2019-07-23 07:24:02 +02:00
|
|
|
import Options.Applicative
|
2019-07-09 11:19:41 +02:00
|
|
|
|
2019-07-23 07:24:02 +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
|
2019-07-23 07:24:02 +02:00
|
|
|
runMyriadServer configInput
|