Small module wrapper for the AWS sdk that allows you to easily use azure.
npm install azure-block-blob-storage
var azure = require('azure-block-blob-storage')({
containerName: 'my-container'
connectionString: '...'
})
azure.put('hello', 'world', function () {
azure.get('hello', console.log)
})
Or if you want use the file system locally instead
var azure = require('azure-block-blob-storage')('my-bucket', {
type: 'fs' // will store the data in ./my-bucket
})
// azure has the same api
Make a new storage instance. Options include:
Write a new value.
Read a value out
Delete a value
Create a readable stream to a key.
Create a writeable stream to a key. Options include
{
length: sizeOfStream, // required
}
Rename a folder/file
Return stat info about a key. The returned object looks like this:
{
size: sizeOfValue,
modified: lastModifiedDate
}
Create a list stream. Each data emitted looks like this
{
key: 'value/key', // the value key
size: 24, // how many bytes
modified: Date() // when was it modified last?
}
Options include:
{
prefix: 'foo', // only list keys under foo
limit: 14 // only return this many
}
MIT