Hello,
I am testing some code about node and azure. According the code snippet @ https://github.com/WindowsAzure/azure-sdk-for-node
varqueueService=azure.createQueueService();queueService.createQueueIfNotExists('taskqueue',function(error){if(!error){// Queue exists}});
In my code I tried:-
var AZURE = require('azure');
function TestQueue(QueueName)
{
var queueService = AZURE.createQueueService(); // error occurred at this line
queueService.createQueueIfNotExists(QueueName, function(error){
if(!error)
{
console.log("ok");
RESPONSE.send(200, { Message: "ok", Status: "ok" });
}
else
{
console.log("error: "+error);
RESPONSE.send(200, { Message: "error", Status: "error" });
}
});
}
Error message:-
NoMatchError: The provided settings {"blobendpoint":"https://undefined.blob.core.windows.net","tableendpoint":"https://undefined.table.core.windows.net","queueendpoint":"https://undefined.queue.core.windows.net"} are not complete.
Question is how to createqueueService?
By the way, following codework fine. But it is not enough for me. I need queue service also.
var AZURE = require('azure');
var SERVICEB_BUS_SERVICE = AZURE.createServiceBusService();
{
SERVICEB_BUS_SERVICE.createQueueIfNotExists(queueName, function(error){
if(!error){
console.log('%s queue created or exist: ',queueName );
RESPONSE.send(200, { Message: "ok", Status: "ok" })
}
else
{
console.log('%s queue creation error.',queuename );
RESPONSE.send(200, { Message: "error", Status: "error" })
}
})
}
Do it now! - Today will be yesterday tomorrow MadSum