Separate lib and exe; add languageDir setting

This commit is contained in:
1computer1 2019-07-23 01:24:02 -04:00
parent abbce96d0a
commit 8eb44f2544
6 changed files with 38 additions and 16 deletions

26
app/Main.hs Normal file
View file

@ -0,0 +1,26 @@
module Main where
import qualified Data.Text as T
import Options.Applicative
import Myriad
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"
])
main :: IO ()
main = do
Args { configInput } <- parseArgs
runMyriadServer configInput