Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.18 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.18 KB

Nest.js API Data Provider For React-Admin

ra-data-nestjsx-crud is a data-provider for react-admin that has been designed to make easier communication between a frontend application built with react-admin and a backend application built via nestjs framework with nestjsx/crud plugin.

Install

Using npm: npm i ra-data-nestjsx-crud

Using yarn: yarn add ra-data-nestjsx-crud

Usage

// in app.jsx file

import React from 'react';
import { Admin, Resource, ShowGuesser } from 'react-admin';
import crudProvider from 'ra-data-nestjsx-crud'
import { UsersList, UserCreate, UserEdit } from './Users'

const dataProvider = crudProvider('http://localhost:3000');
const App = () => (
  <Admin dataProvider={dataProvider}>
    <Resource name="users" list={UsersList} create={UserCreate} edit={UserEdit} show={ShowGuesser} />
  </Admin>
);
export default App;

Notes

Started as a fork of @FusionWorks/ra-data-nest-crud which is now discontinued.