mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
fix sorting and starting web sans ssl
This commit is contained in:
@@ -202,9 +202,10 @@ startWeb foundation = do
|
||||
putStrLn @Text $ "Launching Tor Web Server on port " <> show torPort
|
||||
torAction <- async $ runSettings (warpSettings torPort foundation) app
|
||||
putStrLn @Text $ "Launching Web Server on port " <> show appPort
|
||||
action <- async $ runTLS (tlsSettings sslCertLocation sslKeyLocation)
|
||||
(warpSettings appPort foundation)
|
||||
app
|
||||
action <- if sslAuto
|
||||
then async $ runTLS (tlsSettings sslCertLocation sslKeyLocation)
|
||||
(warpSettings appPort foundation) app
|
||||
else async $ runSettings (warpSettings appPort foundation) app
|
||||
let actions = (action, torAction)
|
||||
|
||||
setWebProcessThreadId (join (***) asyncThreadId actions) foundation
|
||||
|
||||
@@ -40,7 +40,7 @@ getAvailableAppVersions rootDirectory ext@(Extension appId) = do
|
||||
getMostRecentAppVersion :: KnownSymbol a => FilePath -> Extension a -> IO (Maybe RegisteredAppVersion)
|
||||
getMostRecentAppVersion rootDirectory ext = do
|
||||
allVersions <- liftIO $ getAvailableAppVersions rootDirectory ext
|
||||
pure $ head $ sortOn (fst . unRegisteredAppVersion) allVersions
|
||||
pure $ head $ sortOn (Down . fst . unRegisteredAppVersion) allVersions
|
||||
|
||||
-- /root/appId/version/appId.ext
|
||||
getVersionedFileFromDir :: KnownSymbol a => FilePath -> Extension a -> Version -> IO (Maybe FilePath)
|
||||
|
||||
Reference in New Issue
Block a user