Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
/ js-datastore-s3 Public archive

Datastore implementation with S3 backend

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

ipfs/js-datastore-s3

Repository files navigation

⛔️ This module is now part of https://github.com/ipfs/js-stores

datastore-s3

ipfs.tech Discuss codecov CI

IPFS datastore implementation backed by s3

Table of contents

Install

$ npm i datastore-s3

Browser <script> tag

Loading this module through a script tag will make it's exports available as DatastoreS3 in the global namespace.

<script src="https://unpkg.com/datastore-s3/dist/index.min.js"></script>

Usage

If the flag createIfMissing is not set or is false, then the bucket must be created prior to using datastore-s3. Please see the AWS docs for information on how to configure the S3 instance. A bucket name is required to be set at the s3 instance level, see the below example.

import S3 from 'aws-sdk/clients/s3.js'
import { S3Datastore } from 'datastore-s3'

const s3Instance = new S3({ params: { Bucket: 'my-ipfs-bucket' } })
const store = new S3Datastore('.ipfs/datastore', {
  s3: s3Instance
  createIfMissing: false
})

Create a Repo

See examples/full-s3-repo for how to quickly create an S3 backed repo using the createRepo convenience function.

Examples

You can see examples of S3 backed ipfs in the examples folder

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Datastore implementation with S3 backend

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published