azure-functions

A 7-post collection

dotnet new templates for serverless functions

Since .NET Core was announced, I've really been loving the command line experience for .NET Core. Being able to use dotnet new to start a new application regardless of the OS or what shell/terminal experience is on a machine is the way to happiness. The Azure Functions team has put together some fancy new templates for creating serverless apps now. Getting the new templates installed .NET Core templates are all just NuGet packages and installed using dotnet new -i <package-path>. In this case, the templates are on a private feed, so you need to get them nupkg files from https://functionscdn.azureedge.net/public/cli-feed-v3.json. The latest current version right now is from the feed: "2....


Monitoring issues on Stack Overflow with serverless, CosmosDB and Teams

One of the responsibilities we have as Cloud Developer Advocates is having an understanding of the struggles of developers using the cloud in their daily tasks. One way to do that is to spend time looking over the latest questions on Stack Overflow with a little project called StackoverAzure. Instead of having yet another browser tab was to use serverless functions to monitor certain tags and send cards to our Teams room with the pertinent info for anyone on our team to quickly see the most recent unanswered questions. Concept Watch Stack Overflow for questions with the following parameters: Have NOT been answered. (no answer accepted) Tagged with azure Every 30 minutes, the process would grab the last fifty questions...


Serverless like a Superhero with Azure Functions

In my most recent Pluralsight course, I spent some time talking about using Swashbuckle to create documentation for ASP.NET Core WebAPI applications. Swashbuckle is the .NET Core implementation of the OpenAPI Specification aka Swagger, but there are many other open source tools too for other languages. The demo project built was a simple "traditional" ASP.NET Core API that generated a "Superhero Name" based on a FirstName and LastName passed to the GET method. The old API architecture The architecture would not surprise anyone who has seen an MVC structure for ASP.NET Web API projects, except the .NET Core portions. Controllers, Views, Startup.cs, etc., published to an Azure AppService running on IIS. If this were a node....


Use a container to show your function swagger

One option for enabling the Swagger-UI capabilities is to direct the consumers of the api to http://petstore.swagger.io and have them put the url in the box at the top of the page. That's professional right? :-/ Alternatively, you can add the url of the service to the end with ?url= such as http://petstore.swagger.io?url=https://yoursite.azurewebsites.net/docs/swagger.json, but again probably not the best option. Here we can take advantage of Docker here and use the swaggerapi/swagger-ui Docker image and set some ENV variables within an Azure AppService Web Application and accomplish our own SwaggerUI. Creating a new AppService (Linux) Here we will use the Azure CLI to create our...


Unmasking your swagger with proxies in Azure Functions

In my post Testing Azure Functions with Postman and Swagger I showed how to use the API Specification capabilities in Azure Functions and then take the endpoint url and test the API using Postman. Notice the url that is provided for the API. It isn't human readable, nor something I could rattle off to another developer over the phone or easy re-type. Creating a proxy A feature in Azure Function is proxies. Using this feature we can establish a new proxy for our function to point a "nice" url to the "no-so-friendly" API Definition. Now you can share the shorter more reasonable url, even use the test Swagger UI at http://petstore.swagger.io. Be sure to add http://petstore....