diff options
| author | LLLL Colonq <llll@colonq> | 2023-12-19 13:08:22 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2023-12-19 13:08:22 -0500 |
| commit | 0be357bb60a2bc4523056aba34add78b715211f5 (patch) | |
| tree | 5c401183dc05342ee6efc8a4bd163e60a0c17298 /fig-frontend/main | |
| parent | 40a3ac0bd9188139c2cd6b8b1b116e20b6ed8446 (diff) | |
Add fig-frontend
Diffstat (limited to 'fig-frontend/main')
| -rw-r--r-- | fig-frontend/main/Main.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/fig-frontend/main/Main.hs b/fig-frontend/main/Main.hs new file mode 100644 index 0000000..47d10ab --- /dev/null +++ b/fig-frontend/main/Main.hs @@ -0,0 +1,25 @@ +module Main where + +import Fig.Prelude + +import Options.Applicative + +import Fig.Frontend +import Fig.Frontend.Utils + +newtype Opts = Opts + { config :: FilePath + } + +parseOpts :: Parser Opts +parseOpts = Opts + <$> strOption (long "config" <> metavar "PATH" <> help "Path to config file" <> showDefault <> value "fig-frontend.toml") + +main :: IO () +main = do + opts <- execParser $ info (parseOpts <**> helper) + ( fullDesc + <> header "fig-frontend - public-facing web applications" + ) + cfg <- loadConfig opts.config + server cfg |
