Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a helper function to read the command line arguments using the optparse-applicative and the AppConfig type to store them. It also can be used to define other middleware configuration that may be delegated to some sort of external configuration.
It currently includes a hardcoded CORS policy but this could easly be turned in configurable behaviour if needed.
Other hardcoded options such as the minimum version number also belong here.
- prettyVersion :: Text
- readOptions :: IO AppConfig
- corsPolicy :: Request -> Maybe CorsResourcePolicy
- minimumPgVersion :: PgVersion
- data PgVersion = PgVersion {}
- data AppConfig = AppConfig {}
Documentation
prettyVersion :: Text Source #
User friendly version number
readOptions :: IO AppConfig Source #
Function to read and parse options from the command line
corsPolicy :: Request -> Maybe CorsResourcePolicy Source #
CORS policy to be used in by Wai Cors middleware
minimumPgVersion :: PgVersion Source #
Tells the minimum PostgreSQL version required by this version of PostgREST
Config file settings for the server
AppConfig | |
|