pos

postgrest

Use postgrest (RESTful Postgres API) as an npm module and in serverless environments

Showing:

Popularity

Downloads/wk

10

GitHub Stars

15

Maintenance

Last Commit

1mo ago

Contributors

3

Package

Dependencies

9

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

npm install postgrest

const postgrest = require("postgrest")

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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
wetsat42 Ratings45 Reviews
2 months ago

It is the best thing for a startup or if you are building a project and are short on time. We are using Postgrest as our API middleware in our current project and it had saved us a lot of time that would otherwise be wasted in writing the API layer. However, it is slightly different than the rest and involve a bit of learning curve


1
prem-sharma