Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 4, 2019. It is now read-only.

A local REST client for admin-on-rest

License

NotificationsYou must be signed in to change notification settings

marmelab/aor-json-rest-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

archivedArchived Repository
This code is no longer maintained. Feel free to fork it, but use it at your own risks.

For testing purpose withadmin-on-rest, use thejsonRestClient function that simply takes a JavaScript object, and serves as a regular REST client.

Installation

npm install aor-json-rest-client --save-dev

Usage

// in src/App.jsimportReactfrom'react';import{Admin,Resource}from'admin-on-rest';importjsonRestClientfrom'aor-json-rest-client';importdatafrom'./data';/** * data looks like: * { *   posts: [ *     { id: 0, title: 'Hello, world!' }, *     { id: 1, title: 'FooBar' }, *   ], *   comments: [ *     { id: 0, post_id: 0, author: 'John Doe', body: 'Sensational!' }, *     { id: 1, post_id: 0, author: 'Jane Doe', body: 'I agree' }, *   ], * } */import{PostList}from'./posts';constApp=()=>(<AdminrestClient={jsonRestClient(data,loggingEnabled=true)}><Resourcename="posts"list={PostList}/></Admin>);exportdefaultApp;

This REST client doesn't even use the HTTP transport - everything happens within the browser memory. That means that all changes are lost upon refresh. Do NOT use this client in production.

License

This library is licensed under theMIT Licence, and sponsored bymarmelab.

About

A local REST client for admin-on-rest

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp