Package Exports
- @brighter/storage
- @brighter/storage/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@brighter/storage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@brighter/storage
@brighter/storage is a JavaScript object storage library that:
- enables local development,
- has a simple, concise API,
- is well documented and tested against real infrastructure.
Why is local development important? Most of today's software talks directly to the cloud, even in local environments. This extends the feedback loop and creates a storage provider dependency.
This library offers a different approach. It introduces a unified storage interface that enables seamless switching between providers and a local implementation that shortens the feedback loop during development.
A list of supported providers:
local(for local development),s3(AWS) andr2(Cloudflare).
Quick Start
Installation, using npm:
npm i @brighter/storageUsage:
const { Storage } = require('@brighter/storage')
const storage = Storage({
storage: {
type: 'local',
path: '/tmp/storage'
}
})
const main = async () => {
await storage.write('msg', 'hi')
const msg = await storage.read('msg')
console.log(msg)
}
main().catch(console.error)For more information, see the documentation.
Roadmap
v1.0.0-beta.9Renameuri()tourl()and implementuri().v1.0.0-beta.9Add examples.v1.0.0Move out of beta.v1.1.0Support for relative input paths.v1.1.0Ensure input paths can't be out of the storage scope.v2.0.0Detach the storage client from the library.v2.1.0Azure Blob Storage implementationv2.2.0Google Storage implementation