now-postgrest

0.3.0 • Public • Published

now-postgrest

Deploy PostgREST to Now.

now.json
{
    "functions": {
        "api/postgrest.conf": {
            "runtime": "now-postgrest@0.2.30"
        }
    },
    "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

Readme

Keywords

none

Package Sidebar

Install

npm i now-postgrest

Weekly Downloads

126

Version

0.3.0

License

MIT

Unpacked Size

2.23 MB

Total Files

7

Last publish

Collaborators

  • nathancahill