Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
2017-04-30-serverless-with-azure-functions
{
"disabled": false,
"bindings": [
{
"authLevel": "anonymous",
"name": "req",
"type": "httpTrigger",
"direction": "in",
"route": "query/{queryName}",
"methods": [
"post"
]
},
{
"name": "$return",
"type": "http",
"direction": "out"
}
]
}
{
"frameworks": {
"net46":{
"dependencies": {
"CommandQuery.AzureFunctions": "0.2.0"
}
}
}
}
#r "Latest.dll"
using System.Net;
using System.Reflection;
using CommandQuery.AzureFunctions;
static QueryFunction func = new QueryFunction(Assembly.Load("Latest").GetQueryProcessor());
public static async Task<HttpResponseMessage> Run(string queryName, HttpRequestMessage req, TraceWriter log)
{
return await func.Handle(queryName, req, log);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.