我的应用程式需要mongoDB DataProvider功能

时间:2019-01-13 11:50:02

标签: javascript reactjs xmlhttprequest dataprovider react-admin

我需要为使用mongoDB的应用程序创建一个自定义DataProvider,并且以https://r8p7az51jd.execute-api.us-east-1.amazonaws.com/test/viewpoint?$ filter = {}格式进行查询-用于GET和POST查询。 如果我运行这样的代码,它将无法正常工作

这是我的代码:

import React from 'react';
import { Admin, Resource, ListGuesser } from 'react-admin';
import { UserList, PostEdit, PostCreate, PostList  } from './categories';

import authProvider from './authProvider';
import jsonServerProvider from './DataProvider';

const dataProvider = jsonServerProvider('https://r8p7az51jd.execute-api.us-east-1.amazonaws.com/test');


const App = () => (
  <Admin authProvider={authProvider} dataProvider={dataProvider}>
    <Resource name="viewpoint" list={ListGuesser} />
  </Admin>
);

export default App;

0 个答案:

没有答案