Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anywhichway/remotestore
RESTful wrapper for remote servers exposing the Web Storage API
https://github.com/anywhichway/remotestore
Last synced: about 4 hours ago
JSON representation
RESTful wrapper for remote servers exposing the Web Storage API
- Host: GitHub
- URL: https://github.com/anywhichway/remotestore
- Owner: anywhichway
- License: mit
- Created: 2017-07-29T14:58:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T13:16:23.000Z (over 7 years ago)
- Last Synced: 2024-11-09T08:43:39.256Z (6 days ago)
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remotestore
RESTful wrapper for remote servers exposing the Web Storage API# Usage
`npm install remotestore`
If you do not already have a RESTful server supporting the Web Storage API, i.e. `DELETE`, `GET`, `PUT`, and `POST` for `count`, `key` method calls then install `storeserver` with `npm install storeserver`.
If you use `storeserver` it can download `remotestore.js` to you, so your base html file will look something like this:
```
<html>
<head>
<script src="http://localhost:3000/remotestore.js"></script>
</head><script>
const store = new RemoteStore("http://localhost:3000");... your code ...
</script>
</html>
```# API
`RemoteStore` supports the same API and Web Storage except that all methods return a Promise and the `length` property is not available, `count()` must be used instead.
# Release History (reverse chronological order)
v0.0.8 2017-08-06 ALPHA Corrected documentation typos.
v0.0.7 2017-08-06 ALPHA Improved error handling.
v0.0.6 2017-08-01 ALPHA Removed dummy calls that are not part of Web Storage API, e.g. `open` and `close`.
v0.0.5 2017-07-30 ALPHA Fixed issue where `getItem` did not work if caching was off.
v0.0.4 2017-07-30 ALPHA Added error handling for fetch
v0.0.3 2017-07-30 ALPHA Adjusted caching so it could be turned off and on dynamically
v0.0.2 2017-07-30 ALPHA All functions basically working
v0.0.1 2017-07-29 ALPHA First public release