Socket
Socket
Sign inDemoInstall

distack

Package Overview
Dependencies
43
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    distack

Distributed Storage Stack


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
87.3 MB
Created
Weekly downloads
 

Readme

Source

Distributed Storage Stack

NPM version

Read and write to multiple storage systems through one simple API. All read / writes are streamed so large files are no problem. Currently supports serial and parallel writes to:

  • Amazon S3
  • Local disk

Installation

npm install distack

Quick Start

var DSS = require('distack');

// init
var store = new DSS([
    {
        'tag' : 'local',
        'type': 'Disk',
        'cfg' : {...}
    },
    {
        'tag' : 'cloud',
        'type': 'S3',
        'cfg' : {...}
    }
]);

// write
store.write(['local', 'cloud'], 'myKey', 'my/file', function (err) {...});

// read
try {
  var readStream = store.read('local', 'myKey');
} catch(e) {...}

Storage services

Amazon S3

var store = new DSS([
    {
        'tag' : 'cloud',
        'type': 'S3',
        'cfg' : {
            'key'   : '<ACCESS_KEY>',
            'secret': '<SECRET>',
            'region': '<REGION>1',
            'bucket': '<BUCKET_NAME>'
        }
    }
]);

Local Disk Storage

var store = new DSS([
    {
        'tag' : 'local',
        'type': 'Disk',
        'cfg' : {
            'basedir': './uploads'
        }
    }
]);

License

MIT

Keywords

FAQs

Last updated on 10 Jul 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc