Skip to content

supabase/postgrest-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8ba8745 · Mar 13, 2025
Jan 16, 2025
Oct 20, 2022
Mar 13, 2025
Mar 13, 2025
Oct 11, 2022
Sep 20, 2020
Aug 16, 2022
Jan 31, 2020
Oct 18, 2022
Feb 19, 2025
Jan 20, 2025
Jan 20, 2025
Jun 25, 2024
Nov 18, 2024

Repository files navigation

postgrest-js

Build Package License: MIT

Isomorphic JavaScript client for PostgREST. The goal of this library is to make an "ORM-like" restful interface.

Full documentation can be found here.

Quick start

Install

npm install @supabase/postgrest-js

Usage

import { PostgrestClient } from '@supabase/postgrest-js'

const REST_URL = 'http://localhost:3000'
const postgrest = new PostgrestClient(REST_URL)

Custom fetch implementation

postgrest-js uses the cross-fetch library to make HTTP requests, but an alternative fetch implementation can be provided as an option. This is most useful in environments where cross-fetch is not compatible, for instance Cloudflare Workers:

import { PostgrestClient } from '@supabase/postgrest-js'

const REST_URL = 'http://localhost:3000'
const postgrest = new PostgrestClient(REST_URL, {
  fetch: (...args) => fetch(...args),
})

License

This repo is licensed under MIT License.

Sponsors

We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.

New Sponsor