page_type | name | description | languages | products | ||||
---|---|---|---|---|---|---|---|---|
sample |
Using JavaScript SDK v10 for Azure Storage |
Quickstart sample for the Azure Storage v10 SDK for JavaScript. |
|
|
This repository implements the quickstart sample for the Azure Storage v10 SDK for JavaScript.
First, clone the repository on your machine:
git clone https://github.com/Azure-Samples/azure-storage-js-v10-quickstart.git
Then, switch to the appropriate folder:
cd azure-storage-js-v10-quickstart
Next, install the dependencies:
npm install
Finally, rename the file .env.example
to .env
and add your values for AZURE_STORAGE_ACCOUNT_NAME and AZURE_STORAGE_ACCOUNT_ACCESS_KEY.
To run the sample, run the following command on the terminal:
npm start
The output in the terminal will resemble something like this:
Containers:
- container-a
- container-b
Container: "demo" is created
Blob "quickstart.txt" is uploaded
Local file "./readme.md" is uploaded
Blobs in "demo" container:
- quickstart.txt
- readme-stream.md
- readme.md
Downloaded blob content: "hello Node SDK"
Block blob "quickstart.txt" is deleted
Container "demo" is deleted
Done