7.0.1 • Published 4 years ago
postgrest-bin v7.0.1
postgrest-bin
PostgREST serves a fully RESTful API from any existing PostgreSQL database. It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.
Use postgrest (github) as an npm module for tighter integration with node apps (e.g. test fixtures). Also enables postgrest usage in serverless environments.
Usage
npm install postgrest-bin
const postgrest = require("postgrest-bin")
const server = postgrest.startServer({
dbUri: "postgres://postgrest@localhost:5432/postgres",
dbSchema: "public",
serverPort: 3000,
dbAnonRole: "postgres",
//...any other postgrest config option, decamilize is run on each key
})
// you can also do this...
// postgrest.startServer("/path/to/postgrest.conf")
// ...let stuff happen
server.stop()
7.0.1
4 years ago