Socket
Book a DemoInstallSign in
Socket

distack

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

distack

Distributed Storage Stack

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
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

distributed

FAQs

Package last updated on 10 Jul 2014

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.