简体   繁体   English

如何使用新的 NodeJS @azure/storage-queue 库连接到开发 Azure 存储(本地)?

[英]How to connect to Development Azure Storage (local) with the new NodeJS @azure/storage-queue library?

In the Old : https://www.npmjs.com/package/azure-storage there is a way to simply connect to the local Azure Store Emulator, example:在旧版: https : //www.npmjs.com/package/azure-storage 中有一种方法可以简单地连接到本地 Azure 商店模拟器,例如:

var azure = require('azure-storage');
var queueSvc = azure.createQueueService("UseDevelopmentStorage=true");

I am unable to find a substitute or example for https://www.npmjs.com/package/@azure/storage-queue我找不到https://www.npmjs.com/package/@azure/storage-queue的替代品或示例

const { QueueServiceClient } = require("@azure/storage-queue");

const queueServiceClient = QueueServiceClient.fromConnectionString("UseDevelopmentStorage=true");    
const queueClient = queueServiceClient.getQueueClient("<your queue name>");

// do your stuffs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM