Separate lib and exe; add languageDir setting
This commit is contained in:
parent
abbce96d0a
commit
8eb44f2544
6 changed files with 38 additions and 16 deletions
26
app/Main.hs
Normal file
26
app/Main.hs
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue