summaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-15 18:21:04 +1000
committerYuchen Pei <hi@ypei.me>2022-09-15 18:21:04 +1000
commitd4f3629e4eb1a5a8d0dbb82ed4e8087faf6f2a58 (patch)
treeb4eb2bc7d8bd82354f2680d28d3e4a43b2979f24 /app/Main.hs
parent265951e087809e8a45802bc00349d198f3515b19 (diff)
[server] reuse infobox function and separate out main
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 74a03eb..ea64179 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -199,10 +199,13 @@ app = serve api server
api :: Proxy API
api = Proxy
+servall :: ServerConfig -> IO ()
+servall config = run (configPort config) app
+
main :: IO ()
main = do
config <- execParser opts
- run (configPort config) app
+ servall config
where
opts = info
(optParser <**> helper)