Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.05 KB

File metadata and controls

28 lines (17 loc) · 1.05 KB

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...

Ask DeepWiki

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)