Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
feresTalhaoui authored Sep 25, 2020
1 parent b8c541b commit 5f73ad7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,34 @@ the items from APIs by importing the module `react-admin-loopback4-adapted` and
the `lb4Provider` that takes as a @param the url to the backend server `http://localhost:3001`:
```ruby
const dataProvider = lb4Provider('http://localhost:3001');
```
**This is the content of app.js**

```ruby
import * as React from 'react';
import { Admin, Resource } from 'react-admin'
import PostIcon from '@material-ui/icons/Book'
import './App.css';
import Dashboard from './dashboard'
import { ProductList, ProductCreate, Productedit } from './productlist'
import { Userlist, Useredit, Usercreate } from './user'
import lb4Provider from 'react-admin-loopback4-adapted'
const dataProvider = lb4Provider('http://localhost:3001');
const App = () => (
<Admin dataProvider={dataProvider} dashboard={Dashboard}>
<Resource name="products" list={ProductList} create={ProductCreate}
edit={Productedit} icon={PostIcon} />
<Resource name="users" list={Userlist} edit={Useredit}
create={Usercreate} />
</Admin>
)
export default App;
```

**note** In this sample the authentication is not integrated we will complete it in the next tutorial
Expand All @@ -138,6 +166,8 @@ const dataProvider = lb4Provider('http://localhost:3001');
Site : https://planetconectus.com
E-mail : [email protected]
Phone : 00216 26 410 947
Phone : +33 970 440 431
````
Expand Down

0 comments on commit 5f73ad7

Please sign in to comment.