react-admin-nestjsx-crud-dataprovider

Data provider which integrates React Admin with NestJS CRUD library

  • 所有者: FusionWorks/react-admin-nestjsx-crud-dataprovider
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

@FusionWorks/ra-data-nest-crud

GitHub package.json version
NPM

@FusionWorks/ra-data-nest-crud is a dataprovider for react-admin, that has been designed to make easier communication between a frontend application built with react-admin,
and a backend application built with nestjs framework and nestjsx/crud.

Install

Using npm:
npm i @fusionworks/ra-data-nest-crud

Using yarn:
yarn add @fusionworks/ra-data-nest-crud

Usage

// in app.js file

import React from 'react';
import { Admin, Resource, ShowGuesser } from 'react-admin';
import crudProvider from '@fusionworks/ra-data-nest-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;

Note: In case of REST verb "CREATE" consider that the response body is the same as the request body but with the object ID injected .

case CREATE:
return { data: { ...params.data, id: json.id } };

This is because of backwards compatibility compliance.

Example

You can find an example of a project that uses nestjs and nestjsx/crud on backend and admin-ui with @fusionworks/ra-data-nest-crud data provider.

If you need to run it, you need to go to api folder, install dependencies,
change by your needs the config file for nestjs that is located in example/api/src/config/, and run application.

  • cd api
  • npm i
  • npm run start:dev

For frontend part you need just to go to admin-ui folder, install dependencies, and run the app:

  • cd admin-ui
  • npm i
  • npm start

主要指標

概覽
名稱與所有者FusionWorks/react-admin-nestjsx-crud-dataprovider
主編程語言JavaScript
編程語言JavaScript (語言數: 5)
平台
許可證
所有者活动
創建於2019-04-09 13:01:46
推送於2023-01-12 01:42:09
最后一次提交2019-11-27 16:09:21
發布數0
用户参与
星數132
關注者數6
派生數26
提交數33
已啟用問題?
問題數12
打開的問題數8
拉請求數5
打開的拉請求數33
關閉的拉請求數9
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?