I installed Azurite and started ( assuming the command is correct.)
azurite --queueHost 127.0.0.1
I created an outqueue using Azure Storage Explorer
I want to test/use this function
const { app, output } = require('@azure/functions');
const queueOutput = output.storageQueue({
queueName: 'outqueue',
connection: 'MyStorageConnectionAppSetting',
});
app.http('httpTrigger1', {
methods: ['GET', 'POST'],
authLevel: 'anonymous',
extraOutputs: [queueOutput],
handler: async (request, context) => {
const body = await request.text();
context.extraOutputs.set(queueOutput, body);
return { body: 'Created queue item.' };
},
});
What I dont know / understand is "MyStorageConnectionAppSetting" . (The name of an app setting or setting collection that specifies how to connect to Azure Queues. See Connections.)
Error
[2024-04-22T11:04:11.464Z] System.Private.CoreLib: Exception while executing function: Functions.httpTrigger1. Microsoft.Azure.WebJobs.Extensions.Storage.Queues: Storage account connection string 'AzureWebJobsMyStorageConnectionAppSetting' does not exist. Make sure that it is a defined App Setting.
what is the step I am missing to create that MyStorageConnectionAppSetting ? Any reference documentation that gives the steps is appreciated.
Thank you
