@cybertec-postgresql/postgrest-node

1.2.2 • Public • Published

postgrest-node

npm version

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. - postgrest github

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

yarn add @cybertec-postgresql/postgrest-node

const postgrest = require("@cybertec-postgresql/postgrest-node")

const server = postgrest.startServer({
  dbUri: "postgres://postgrest@localhost:5432/postgres",
  dbSchema: "public",
  serverPort: 3000,
  dbAnonRole: "postgres",
  //...any other postgrest config option, decamelize is run on each key
})

// you can also do this...
// postgrest.startServer("/path/to/postgrest.conf")

// ...let stuff happen

server.stop()

Serverless Usage

Here's how to run postgrest on a serverless platform like vercel.

Readme

Keywords

Package Sidebar

Install

npm i @cybertec-postgresql/postgrest-node

Weekly Downloads

4

Version

1.2.2

License

MIT

Unpacked Size

12.6 kB

Total Files

12

Last publish

Collaborators

  • svitlana_lyt
  • gkobluk