Coder Social home page Coder Social logo

azfuncs---pipeline's Introduction

Azure serverless functions

Example of common bindings and their use cases when developing Azure functions from VS17.

The program will execute an HTTP triggered function (WebHook.cs) when a POST request is made and add information into a queue and a table storage. Another azfunc (GenerateLicenseFile.cs) will be triggered when a new item is added to the queue. This queue item will be added to blob storage. Whenever a new item is added to the blob storage, a blob triggered function (EmailLicenseFile.cs) will execute. This function will retrieve the desired row from table storage for the email address of the sender and receiver of the request, create a new Email object (SendGridMessage) and send it, along with some additional information about the send data and a message, to the receiver email address.

POST request:

The POST request should have the same structure as the 'Order' class in WebHook.cs.

Example:

{
"OrderId": "1",
"ProductId": "50",
"ToEmail": "<YourOwnEmailIfYouWantToEnsureItworks>",
"FromEmail": "<AnyValidEmailReally>",
"Message": "Enter your email message here",
"Price": "1000"
}

For the SendGrid implementation, don't forget to create a SendGrid Api Key and update the application settings in the Azure portal.

If running the solution locally:

The local.settings.json is .gitignored and must also be added and configured. The 'AzureWebJobsStorage' key value must be set to 'true' and the 'AzureWebJobsSendGridApiKey' must contain a valid Api key.

Example:

{
    "IsEncrypted": false,
    "Values": {
     "AzureWebJobsSendGridApiKey": <ApiKey>,
     "AzureWebJobsStorage": "UseDevelopmentStorage=true",
     "FUNCTIONS_WORKER_RUNTIME": "dotnet"
     },
"ConnectionStrings": {}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.