now-postgrest
v0.3.0
Published
Deploy PostgREST to Now.
Downloads
66
Readme
now-postgrest
Deploy PostgREST to Now.
now.json
{
"functions": {
"api/postgrest.conf": {
"runtime": "[email protected]"
}
},
"routes": [
{ "src": "api/rpc/.*", "dest": "api/postgrest.conf" },
{ "src": "api/(films|actors)", "dest": "api/postgrest.conf" }
],
"env": {
"DB_URI": "@secret-db-uri"
}
}
api/postgrest.conf
db-uri = "$(DB_URI)"
db-schema = "api"
db-anon-role = "web_anon"
Locally with now dev
A local postgrest
binary is required to be in your $PATH
. Follow the installation instructions.
.env
DB_URI=postgres:///app