【发布时间】:2018-12-05 19:34:16
【问题描述】:
我正在开发简单的 node.js 代码,用于使用 http 触发器函数通过 Azure 函数应用程序将新文档插入 cosmosDB。这只是从http的参数中获取输入值并输出到cosmosDB(SQL api)。大约在过去 2 周内,它成功运行,但现在面临内部服务器错误。这就是为什么?是否影响 azure 函数的运行时小版本更新?
->function.json
{
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req"
},
{
"name": "outputDocument",
"type": "cosmosDB",
"databaseName": "ToDoList",
"collectionName": "Items",
"createIfNotExists": true,
"connectionStringSetting": "COSMOSDB_CONNECTION",
"direction": "out"
}
]
}
->index.js
module.exports = function (context, req) {
context.bindings.outputDocument = JSON.stringify({
name: req.query.name
});
context.done();
};
->浏览错误
INTERNAL SERVER ERROR
【问题讨论】:
标签: node.js azure azure-functions azure-cosmosdb