Fix compiling on windows(unix socket issue)

Group unix socket functionality into its own module
This commit is contained in:
steve-chavez
2020-04-03 11:22:11 -05:00
committed by Steve Chavez
parent 426637a47c
commit 18e45659ea
4 changed files with 67 additions and 41 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ data AppConfig = AppConfig {
, configSchemas :: NonEmpty Text
, configHost :: Text
, configPort :: Int
, configSocket :: Maybe Text
, configSocket :: Maybe FilePath
, configSocketMode :: Either Text FileMode
, configJwtSecret :: Maybe B.ByteString
@@ -159,7 +159,7 @@ readOptions = do
<*> (fromList . splitOnCommas <$> reqValue "db-schema")
<*> (fromMaybe "!4" <$> optString "server-host")
<*> (fromMaybe 3000 <$> optInt "server-port")
<*> optString "server-unix-socket"
<*> (fmap unpack <$> optString "server-unix-socket")
<*> parseSocketFileMode "server-unix-socket-mode"
<*> (fmap encodeUtf8 <$> optString "jwt-secret")
<*> (fromMaybe False <$> optBool "secret-is-base64")