This is a guide on how to set up the Azure Functions CLI to debug functions locally.
🚧 WARNING - This is very experimental and not yet very easy. I'm writing up this guide for the brave few. WARNING 🚧
🐲 Beyond here be dragons. 🐲
<!-- | |
To change this template, choose Tools | Templates | |
and open the template in the editor. | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> |
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"ChatWork.Api": "0.4.0" | |
} | |
} | |
} | |
} |
module.exports = function(context, req) { | |
var method = req.method.toLowerCase(); | |
context.log(JSON.stringify(req, null, " ")); | |
if(methods[method]){ | |
methods[method](context, req); | |
} else { | |
context.res = { | |
status: 404, | |
body: "No route found for VERB: " + req.method | |
} |
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2017-01-25 22:48:35" build="161206"> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Shells::PowerShell}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> | |
<value name="StartFarEditors" type="hex" data="00"/> |
requests | |
| where timestamp > ago(30m) | |
| summarize percentiles(duration, 50, 95, 99) by bin(timestamp, 1m) | |
| render timechart |
{ | |
"properties": { | |
"issue_description": { | |
"type": "number" | |
}, | |
"issue_title": { | |
"type": "string" | |
} | |
}, | |
"type": "object" |
{ | |
"logger": { | |
"categoryFilter": { | |
"defaultLevel": "Information", | |
"categoryLevels": { | |
"Host.Results": "Error", | |
"Function": "Error", | |
"Host.Aggregator": "Information" | |
} | |
}, |
public class StartUpWork { | |
private static StartUpWork _singleton; | |
private string initializeOnce; | |
public StartUpWork() { | |
// Do long startup tasks/create database connection pools/whatever you want to happen once | |
this.initializeOnce = "Woooooo!"; | |
} | |
public static StartUpWork ensureStartUp() { |
var request = require('request'); | |
var uuid = require('node-uuid'); | |
/* Requires a Cognitive Services Text Analytics */ | |
/* Be sure to install the request and node-uuid packages and add the "COG_URL" and "COG_KEY" App Settings before running */ | |
module.exports = function(context, req) { | |
context.log('Node.js HTTP trigger function processed a request. RequestUri=%s', req.originalUrl); | |
// Make a call out to Cognitive Services |