aor-parseserver-client
An admin-on-rest client for Parse Server.
Installation
npm install aor-parseserver-client --save
Usage
<Admin>
component
As a parameter of the // in src/App.js;;;; const parseConfig = URL : 'https://my-app-url.com/parse' 'APP-ID' : 'MyAppId' 'REST-API-KEY' : 'MyRestAPIKey'; const App = <Admin restClient= > <Resource name="posts" list=PostList /> </Admin>; ;
As a standalone function
;;; const parseConfig = URL : 'https://my-app-url.com/parse' 'APP-ID' : 'MyAppId' 'REST-API-KEY' : 'MyRestAPIKey';const client = ; const d = ;d; ;
Auth Client
The package lets you manage the login/logout process implementing an optional authClient
prop of the Admin
component (see documentation).
It stores a parseToken
in localStorage
and passes it at every request as a X-Parse-Session-Token
header.
// in src/App.js...; const App = <Admin restClient= authClient=> <Resource name="posts" list=PostList /> </Admin>; ;
Changelog
v0.3.0
- Add support for
include
parameter - Fix HTTP 400 error handling
License
This library is licensed under the MIT Licence.