postgrest-5.2.0: REST API for any Postgres database

Safe HaskellNone



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 Source #

User friendly version number

docsVersion :: Text Source #

Version number used in docs

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