从Azure Web App向Cosmos进行查询

时间:2018-11-17 00:01:51

标签: azure azure-cosmosdb azure-web-app-service

我有一个以天蓝色运行的Cosmos数据库,也有一个在Azure中运行的nodejs中的Web API,可以在本地运行查询,但是当我压缩部署以使天蓝色时,这部分编码给我错误。 / p>

const CosmosClient = require('@azure/cosmos').CosmosClient; The page cannot be displayed because an internal server error has occurred.

有人知道为什么在尝试要求CosmosClient时出现此错误吗?

1 个答案:

答案 0 :(得分:0)

我要做的是在名为iisnode.yml的根文件夹中创建一个新文件,并添加nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\{version-here}\node.exe" 然后就这样了。