You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--| Given a shutdown handler and an AppConfig builds a Warp Settings to start a stand-alone server
49
49
warpSettings:: (IO()->IO()) ->AppConfig->Settings
@@ -73,6 +73,14 @@ readOptions =
73
73
<*> var auto "PGWS_POOL_SIZE" (def 10<> helpDef show<> help "How many connection to the database should be used by the connection pool")
74
74
<*> var auto "PGWS_RETRIES" (def 5<> helpDef show<> help "How many times it should try to connect to the database on startup before exiting with an error")
75
75
76
+
loadDatabaseURIFile::AppConfig->IOAppConfig
77
+
loadDatabaseURIFile conf@AppConfig{..} =
78
+
case stripPrefix "@" configDatabase of
79
+
Nothing->pure conf
80
+
Just filename -> setDatabase . strip <$>readFile (toS filename)
0 commit comments