For using postgREST with admin-on-rest, use the postgrestClient
function to convert AOR's REST dialect into one compatible with postgREST.
npm install aor-postgrest-client --save
// in src/App.js
import React from 'react';
import { Admin, Resource } from 'admin-on-rest';
import postgrestClient from 'aor-postgrest-client';
import { PostList } from './posts';
const App = () => (
<Admin restClient={postgrestClient('/mypostgrestendpoint')}>
<Resource name="posts" list={PostList} />
</Admin>
);
export default App;
command | Description |
---|---|
npm run-script build |
Build process to generate main target 'lib' |
npm run-script publish |
Shortcut that will trigger build before running npm publish |
This library is licensed under the MIT Licence, and sponsored by tomberek.