Safe Haskell | None |
---|---|
Language | Haskell2010 |
PostgREST.Config
Description
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 :: String
- readOptions :: IO AppConfig
- corsPolicy :: Request -> Maybe CorsResourcePolicy
- minimumPgVersion :: Integer
- data AppConfig = AppConfig {}
Documentation
prettyVersion :: String 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 :: Integer Source
Tells the minimum PostgreSQL version required by this version of PostgREST
Data type to store all command line options
Constructors
AppConfig | |
Fields
|