Safe Haskell | None |
---|---|
Language | Haskell2010 |
Hipsql.API.Internal
Contents
Description
Internal module which implements the hipsql
HTTP API using servant
.
Disclaimer
Changes to this module will not be reflected in the library's version updates.
Internals
Used to show version information for a hipsql server or client.
lookupHipsqlPort :: IO (Either String Int) Source #
Lookup the HTTP port to use for a hipsql HTTP server or client
by checking the HIPSQL_PORT
environment variable. Defaults
to defaultHipsqlPort
if unset.
defaultHipsqlPort :: Int Source #
By default, hipsql should use the port 55805
.
lookupEnvInt :: String -> IO (Maybe (Either String Int)) Source #
Lookup an environment variable and parse it as an Int
.
withDefault :: IO (Maybe a) -> a -> IO a Source #
Used in conjunction with lookupEnvInt
to set a default value.