# redux-persist-restful-storage

> use RESTful storage for redux-persist

Latest version **1.0.8** (published 2017-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install redux-persist-restful-storage
pnpm add redux-persist-restful-storage
yarn add redux-persist-restful-storage
bun add redux-persist-restful-storage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2017-01-18 |
| First published | 2017-01-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chih-Hsiang Chang |
| Maintainers | jimmy_0435 |
| Keywords | redux-persist |

## Links

- npm: https://www.npmjs.com/package/redux-persist-restful-storage
- Repository: https://github.com/qwe852/redux-persist-restful-storage
- Homepage: https://github.com/qwe852/redux-persist-restful-storage#readme
- Issues: https://github.com/qwe852/redux-persist-restful-storage/issues
- npm.io page: https://npm.io/package/redux-persist-restful-storage

## Dependencies (1)

- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.1

## Recent versions

- 1.0.8 (latest) — 2017-01-18
- 1.0.7 — 2017-01-18
- 1.0.6 — 2017-01-18
- 1.0.4 — 2017-01-18
- 1.0.2 — 2017-01-18
- 1.0.1 — 2017-01-18
- 1.0.0 — 2017-01-18

## README

# Redux persist RESTful storage


use RESTful way to build a storage adaptor for [redux-persist](https://github.com/rt2zz/redux-persist) by implementing methods: `setItem`, `getItem`, `removeItem` and `getAllKeys`

## install 

```bash
npm install --save redux-persist-restful-storage
```

## usage 
```javascript
import { AsyncRESTfulStorage } from 'redux-persist-restful-storage'
import { persistStore, autoRehydrate } from 'redux-persist'
const store = createStore(reducer, undefined, autoRehydrate())
persistStore(store, { storage: new AsyncRESTfulStorage() })
``` 

## example 

You need to build your own RESTful API server to communicate with redux-persist. 

``` /example ``` present an example with nodeJS. Use [express](https://github.com/expressjs/express) to create a HTTP server and [node-localstorage](https://github.com/lmaccherone/node-localstorage) to save/get data.

To run with
```bash
npm init
npm install body-parser express node-localstorage
node nodeApiExample.js
```

---
_Source: https://npm.io/package/redux-persist-restful-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
