This repository contains the code for serverless Azure Function that generates QR codes for provided URLs and stores them in Azure Blob Storage. The function is written in JavaScript and can be triggered via HTTP requests.
Send a GET request to the Azure Function https://azure-qr-code.azurewebsites.net/api/GenerateQRCode with url as parameter.
curl example:
curl -X GET https://azure-qr-code.azurewebsites.net/api/GenerateQRCode -H "Content-Type: application/json" -d '{"url":"https://www.example.com"}'- Serverless: Leverages Azure Functions for minimal infrastructure management.
- QR Code Generation: Dynamically creates QR codes for any given URL.
- Azure Blob Storage: Stores the generated QR codes in the cloud for easy access and management.
- Node.js
- Azure Functions Core Tools
- Azure CLI
- An Azure account and an Azure Blob Storage account.
git clone https://github.com/rishabkumar7//azure-qr-code.git
cd azure-qr-code/qrCodeGeneratornpm installSet up your local.settings.json file with the necessary configuration values:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "node",
"STORAGE_CONNECTION_STRING":"<YOUR_STORAGE_CONNECTION_STRING>"
}
}To start the function app locally, make sure you have Azure Functions Core Tools installed, then run:
func startDeploy your function app to Azure using the following command:
func azure functionapp publish <YOUR_FUNCTION_APP_NAME>Send a GET request to your function's endpoint with a JSON payload containing the URL:
curl -X GET https://<YOUR_FUNCTION_URL>/api/GenerateQRCode -H "Content-Type: application/json" -d '{"url":"https://www.example.com"}'
- Twitter: @rishabincloud
- GitHub: @rishabkumar7

