Run PostgREST with zero config. Related to https://github.com/PostgREST/postgrest/pull/2112

This commit is contained in:
Wolfgang Walther
2022-01-24 10:24:39 +01:00
committed by Wolfgang Walther
parent 5187eadd0b
commit 5f938dbe1a
4 changed files with 58 additions and 45 deletions
+2 -2
View File
@@ -140,7 +140,7 @@ Next make a role to use for anonymous web requests. When a request comes in, Pos
The :code:`web_anon` role has permission to access things in the :code:`api` schema, and to read rows in the :code:`todos` table.
It's a good practice to create a dedicated role for connecting to the database, instead of using the highly privileged ``postgres`` role. So we'll do that, name the role ``authenticator`` and also grant him the ability to switch to the ``web_anon`` role :
It's a good practice to create a dedicated role for connecting to the database, instead of using the highly privileged ``postgres`` role. So we'll do that, name the role ``authenticator`` and also grant it the ability to switch to the ``web_anon`` role :
.. code-block:: postgres
@@ -157,7 +157,7 @@ Now quit out of psql; it's time to start the API!
Step 5. Run PostgREST
---------------------
PostgREST uses a configuration file to tell it how to connect to the database. Create a file :code:`tutorial.conf` with this inside:
PostgREST can use a configuration file to tell it how to connect to the database. Create a file :code:`tutorial.conf` with this inside:
.. code-block:: ini