GithubHelp home page GithubHelp logo

zachferland / js-datastore-s3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ipfs/js-datastore-s3

0.0 2.0 0.0 88 KB

Datastore implementation with S3 backend

License: MIT License

JavaScript 100.00%

js-datastore-s3's Introduction

js-datastore-s3

standard-readme compliant Build Status codecov Coverage Status Dependency Status js-standard-style

Datastore implementation backed by s3.

Lead Maintainer

Jacob Heun

Table of Contents

Install

$ npm install datastore-s3

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.

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

Create a Repo

You can quickly create an S3 backed repo using the createRepo convenience function.

const IPFS = require('ipfs')
const { createRepo } = require('datastore-s3')

const ipfs = new IPFS({
  repo: createRepo({
    path: '/my/ipfs'
  }, {
    bucket: 'MyS3Bucket'
  })
})

Examples

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

Contribute

PRs accepted.

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT 2018 © IPFS

js-datastore-s3's People

Contributors

jacobheun avatar justinmchase avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.