Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blackboxvision/ra-data-jsonapi-microservices
:rocket: React Admin provider with support for microservices with JSON API
https://github.com/blackboxvision/ra-data-jsonapi-microservices
data-provider json-api microservice react react-admin
Last synced: about 3 hours ago
JSON representation
:rocket: React Admin provider with support for microservices with JSON API
- Host: GitHub
- URL: https://github.com/blackboxvision/ra-data-jsonapi-microservices
- Owner: BlackBoxVision
- License: mit
- Created: 2020-05-27T16:33:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T07:11:48.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T17:38:01.512Z (22 days ago)
- Topics: data-provider, json-api, microservice, react, react-admin
- Language: TypeScript
- Homepage:
- Size: 771 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Micro Services JSON API DataProvider
React Admin DataProvider with support for micro-services architecture with JSON API Spec.
## Install
You can install this library via NPM or YARN.
### NPM
```bash
npm i @blackbox-vision/ra-data-jsonapi-microservices
```### YARN
```bash
yarn add @blackbox-vision/ra-data-jsonapi-microservices
```## Use case
You use react-admin for building a frontend to manage CRUD resources, and you have a micro-service architecture for your services.
## Example Usage
### Normal usage
```javascript
import React from 'react';
import { Admin, Resource } from 'react-admin';
import { microServicesJsonApiProvider } from '@blackbox-vision/ra-data-jsonapi-microservices';import { PostList } from './posts';
const dataProvider = microServicesJsonApiProvider({
posts: 'http://posts.api.url',
});const App = () => (
);export default App;
```### Passing a custom HTTP Client
```javascript
import React from 'react';
import { Admin, Resource } from 'react-admin';
import { microServicesJsonApiProvider } from '@blackbox-vision/ra-data-jsonapi-microservices';import { PostList } from './posts';
const customHttpClient = (url, options = {}) => {};
const dataProvider = microServicesJsonApiProvider(
{ posts: 'http://posts.api.url' },
customHttpClient,
);const App = () => (
);export default App;
```## Issues
Please, open an [issue](https://github.com/BlackBoxVision/ra-data-jsonapi-microservices/issues) following one of the issues templates. We will do our best to fix them.
## Contributing
If you want to contribute to this project see [contributing](https://github.com/BlackBoxVision/ra-data-jsonapi-microservices/blob/master/CONTRIBUTING.md) for more information.
## License
Distributed under the **MIT license**. See [LICENSE](https://github.com/BlackBoxVision/ra-data-jsonapi-microservices/blob/master/LICENSE) for more information.