Deploy PostgREST to Now.
{
"functions": {
"api/postgrest.conf": {
"runtime": "now-postgrest@0.3.0"
}
},
"routes": [
{ "src": "api/rpc/.*", "dest": "api/postgrest.conf" },
{ "src": "api/(films|actors)", "dest": "api/postgrest.conf" }
],
"env": {
"DB_URI": "@secret-db-uri"
}
}
db-uri = "$(DB_URI)"
db-schema = "api"
db-anon-role = "web_anon"
base-url = "/api/"
A local postgrest
binary is required to be in your $PATH
. Follow the installation instructions.
DB_URI=postgres:///app