Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sadorlovsky/lowdb-s3

Lowdb AWS S3 adapter
https://github.com/sadorlovsky/lowdb-s3

adapter amazon lowdb nodejs s3

Last synced: about 1 month ago
JSON representation

Lowdb AWS S3 adapter

Awesome Lists containing this project

README

        

# lowdb-s3

> Lowdb AWS S3 adapter

Adapter for [lowdb](https://github.com/typicode/lowdb) which uses AWS S3 to store data.

Requires [[email protected]](https://github.com/typicode/lowdb/tree/v1.0.0).

## Usage

```bash
npm install @sadorlovsky/lowdb-s3@1
```

```js
const low = require('lowdb')
const S3 = require('@sadorlovsky/lowdb-s3')

const adapter = new S3({ bucket: 'bucket', key: 'db.json' })
const db = await low(adapter)
```

Custom S3 config

```js
const low = require('lowdb')
const S3 = require('@sadorlovsky/lowdb-s3')

const adapter = new S3({ bucket: 'bucket', key: 'db.json' }, {
accessKeyId: 'ACCESS_KEY_ID',
secretAccessKey: 'SECRET_ACCESS_KEY',
region: 'custom-region',
endpoint: 'custom.endpoint.com'
})
const db = await low(adapter)
```

## License

MIT