Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neonerd/postgrest-js
https://github.com/neonerd/postgrest-js
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/neonerd/postgrest-js
- Owner: neonerd
- License: mit
- Created: 2019-04-05T09:13:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T15:02:57.000Z (almost 2 years ago)
- Last Synced: 2024-11-19T16:59:23.706Z (about 1 month ago)
- Language: TypeScript
- Size: 800 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PostgREST.js
Heavy WIP, consider yourself warned.
## What is PostgREST.js?
PostgREST.js is a client library for consuming PostgREST APIs. It provides a set of functions and TypeScript interfaces to make your life easier when working with PostgREST in web browsers on Node.JS.
PostgREST.js is not an ORM, nor does it provide any specific entity mapping pattern. You have to provide types for your entities yourself.
## Installation
```
npm install --save postgrest-js
```## Usage
TypeScript / ES6
```
import {createConfig, get} from 'postgrest-js'const config = createConfig({
endpoint: 'https://api.example.com',
authorizationToken: 'example'
})async function foo () {
const response = await get('customer', {}, config)
console.log(response.items)
}
foo()
```