GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - datatorch/node-storage: :mailbox_with_mail: A unified file storage library for storage in cloud or on premise

BranchesTags
Open more actions menu

Latest commit

 

History

94 Commits
94 Commits

Folders and files

NameName
Last commit message
Last commit date
packages
packages
 
 
.gitignore
.gitignore
 
 
.prettierrc
.prettierrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
lerna.json
lerna.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Node File Storage

In many applications the ability to dynamically change or read files from different storage providers is a must. These packages provides a implementation for Storage to standardize common functions.

This repository contains the core class along with implementations.

Usage samples can be found on the repository here.

The gist

Install the packages you need:

# Local Storage
$ yarn add storage-core

# Azure Storage
$ yarn add storage-azure

# AWS Storage
$ yarn add storage-aws

# Google Cloud Storage
$ yarn add storage-gcp

Create a storage instance with the required configuration and write to it.

import { LocalStorage } from 'storage-core'
import { AzureBlobStorage } from 'storage-azure'
import { AwsS3Storage } from 'storage-aws'

// Write to local folder
const ls = new LocalStorage({ path: process.env.PATH })
await ls.writeFile('local-write/test.txt', 'using local storage')

// Write to azure blob
const az = new AzureBlobStorage({
  container: process.env.CONTAINER,
  accountName: process.env.ACCOUNT_NAME,
  accountKey: process.env.ACCOUNT_KEY
})
await az.writeFile('azure-write/test.txt', 'using azure storage')

// Write to aws s3
const aws = new AwsS3Storage({
  bucket: process.env.BUCKET,
  accessKeyId: process.env.ACCESS_KEY,
  secretAccessKey: process.env.SECRET_KEY
})
await aws.writeFile('aws-write/test.txt', 'using aws s3 storage')

About

📬 A unified file storage library for storage in cloud or on premise

Topics

aws-s3azure-storagegcp-storagestorage

Resources

Readme
MIT license
Activity
Custom properties

Stars

28 stars

Watchers

0 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.