@brighter/storage-adapter-local
Version:
This is a local adapter for the @brighter/storage object storage library.
35 lines (23 loc) • 611 B
Markdown
This is a local object storage adapter for the `@brighter/storage` library.
Installation, using npm:
```
npm i @brighter/storage-adapter-local
```
Usage:
```js
import { Storage } from '@brighter/storage-adapter-local'
const storage = Storage({
path: '/tmp/storage'
})
const main = async () => {
await storage.write('msg', 'hi')
const msg = await storage.read('msg')
console.log(msg)
}
main().catch(console.error)
```
For more information:
- have a look at the [demo](demo/) folder or
- dive straight into the [documentation](docs/Storage.md).