diff --git a/docs/install/server.md b/docs/install/server.md
index 325d17a14..14d8dfcc8 100644
--- a/docs/install/server.md
+++ b/docs/install/server.md
@@ -65,7 +65,7 @@ If you want to run the test suite, stack can do that too: `stack test`.
### Running the Server
```bash
-postgrest postgres://user:pass@host:port/db -s public -a anon_user [other flags]
+postgrest postgres://user:pass@host:port/db -a anon_user [other flags]
```
The user in the connection string is the "authenticator role," i.e.
@@ -73,7 +73,7 @@ a role which is used temporarily to switch into other roles depending
on the authentication request JWT. For simple API's you can use the
same role for authenticator and anonymous.
-The possible flags are:
+The complete list of options:
- -p, --port
@@ -84,7 +84,7 @@ The possible flags are:
- The database role used to execute commands for those requests
which provide no JWT authorization.
-- -s, --schema (required)
+- -s, --schema
- The db schema which you want to expose as an API. For historical
reasons it defaults to
1, but you're more likely
to want to choose a value of public.
diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs
index d1e1e6676..8c60ef553 100644
--- a/src/PostgREST/Config.hs
+++ b/src/PostgREST/Config.hs
@@ -37,9 +37,9 @@ import Prelude
-- | Data type to store all command line options
data AppConfig = AppConfig {
configDatabase :: String
- , configPort :: Int
, configAnonRole :: String
, configSchema :: String
+ , configPort :: Int
, configJwtSecret :: Secret
, configPool :: Int
, configMaxRows :: Maybe Integer
@@ -48,10 +48,9 @@ data AppConfig = AppConfig {
argParser :: Parser AppConfig
argParser = AppConfig
<$> argument str (help "(REQUIRED) database connection string" <> metavar "DB_URL")
-
- <*> option auto (long "port" <> short 'p' <> help "port number on which to run HTTP server" <> metavar "PORT" <> value 3000 <> showDefault)
<*> strOption (long "anonymous" <> short 'a' <> help "(REQUIRED) postgres role to use for non-authenticated requests" <> metavar "ROLE")
- <*> strOption (long "schema" <> short 's' <> help "(REQUIRED) schema to use for API routes" <> metavar "NAME" <> value "public" <> showDefault)
+ <*> strOption (long "schema" <> short 's' <> help "schema to use for API routes" <> metavar "NAME" <> value "public" <> showDefault)
+ <*> option auto (long "port" <> short 'p' <> help "port number on which to run HTTP server" <> metavar "PORT" <> value 3000 <> showDefault)
<*> (secret . cs <$>
strOption (long "jwt-secret" <> short 'j' <> help "secret used to encrypt and decrypt JWT tokens" <> metavar "SECRET" <> value "secret" <> showDefault))
<*> option auto (long "pool" <> short 'o' <> help "max connections in database pool" <> metavar "COUNT" <> value 10 <> showDefault)