@fakel/rest-admin
Version:
An application that makes it easier to work with your API
48 lines (35 loc) • 802 B
Markdown
An application that makes it easier to work with your API
[](https://ra.fakel.com.ua/)
Using npm:
```
$ npm i @fakel/rest-admin
```
Using yarn:
```
$ yarn add @fakel/rest-admin
```
Create a React app, for example with [create-react-app](https://github.com/facebook/create-react-app), in your root component add the following code:
```
import React from 'react';
const dataProvider = createSimpleRest({ apiBaseUrl: 'http://localhost:3000' });
const App = () => {
return (
<Admin
dataProvider={dataProvider}
>
<Resource
name="posts"
list={PostsView}
edit={PostEdit}
create={PostsCreate}
options={{
label: 'Posts',
}}
/>
</Admin>
)
}
```