Postgrest can be used to run an api for nycdb.
Here's an example postgrest configuration conf:
db-uri = "postgres://postgres:[email protected]:5432/postgres"
db-schema = "public"
db-anon-role = "anon"
db-pool = 10
server-port = 8080
max-rows = 5000
You will be to create an new postgres user named "anon":
create role anon;
grant usage on schema public to anon;
grant select on all tables in schema public to anon;
grant execute on all functions in schema public to anon;