Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hlaueriksson/7ceeded33ebe530c3456a03ba15ee489 to your computer and use it in GitHub Desktop.
Save hlaueriksson/7ceeded33ebe530c3456a03ba15ee489 to your computer and use it in GitHub Desktop.
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