@beauraines/node-helpers

4.2.1 • Public • Published

Node Helpers

This is a set of helpers for NodeJS. They're written for quick reuse rather than robust functions or efficiency. For instance, the database functions will create a new database connection every time. This is not efficient, but it makes making the function call simple.

My use is primarily in quicker one-off scripts that sometimes morph into something long-lasting...

Azure Storage

Get blob from Azure example, downloads bar.jpg from foo container to baz.jpg

const AzureStorage  = require('./src/azure.js')


let storageAccountName = 'devstoreaccount1'
let storageAccountKey = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='
let options = {cloudName: 'Azurite'}

let azure = new AzureStorage(storageAccountName,storageAccountKey,options)

let containerName = 'foo'
let blob = 'bar.jpg'
let file = 'baz.jpg'
await azure.downloadBlobToFile(containerName,blob,file)

Readme

Keywords

none

Package Sidebar

Install

npm i @beauraines/node-helpers

Weekly Downloads

189

Version

4.2.1

License

ISC

Unpacked Size

72.4 kB

Total Files

22

Last publish

Collaborators

  • beauraines