reworked constants into configurable settings

This commit is contained in:
Lucy Cifferello
2020-03-12 17:26:27 -06:00
parent 924f5df8e1
commit 74d3c0c1b8
10 changed files with 97 additions and 92 deletions

View File

@@ -165,16 +165,15 @@ startApp :: AgentCtx -> IO ()
startApp foundation = do
-- set up ssl certificates
putStrLn @Text "Setting up SSL"
setupSsl
_ <- setupSsl <$> getAppSettings
putStrLn @Text "SSL Setup Complete"
startWeb foundation
startWeb :: AgentCtx -> IO ()
startWeb foundation = do
app <- makeApplication foundation
putStrLn @Text $ "Launching Web Server on port " <> show (appPort $ appSettings foundation)
let AppSettings{..} = appSettings foundation
putStrLn @Text $ "Launching Web Server on port " <> show appPort
action <- async $ runTLS
(tlsSettings sslCertLocation sslKeyLocation)
(warpSettings foundation)