@sadorlovsky/lowdb-s3
v1.0.5
Published
lowdb AWS S3 adapter
Downloads
28
Readme
lowdb-s3
Lowdb AWS S3 adapter
Adapter for lowdb which uses AWS S3 to store data.
Requires [email protected].
Usage
npm install @sadorlovsky/lowdb-s3@1
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
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