Rem*_*sen 4 deployment azure node.js azure-functions
我已经部署了一个函数应用程序,但没有可见的函数:
在 Kodu 中,我看到的似乎是正确的(文件位于 wwwroot 下):
在应用程序文件选项卡中。我可以看到两个文件夹分隔符,我猜这可能是问题所在:
我已WEBSITE_RUN_FROM_PACKAGE禁用并且正在部署:
az functionapp deployment source config-zip -g <resource-group> -n <app-name> --src ./deploy.zip
Run Code Online (Sandbox Code Playgroud)
在尝试了数百万次之后,这对我来说是这样的:
\n我的文件夹结构如下:
\ndist <-- this folder is present if you use TypeScript\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 src\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 dal\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 functions\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 <MY FUNCTIONS ARE HERE>\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 shared\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 host.json\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 package.json\nRun Code Online (Sandbox Code Playgroud)\n我的改变之一是host.json:
dist <-- this folder is present if you use TypeScript\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 src\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 dal\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 functions\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 <MY FUNCTIONS ARE HERE>\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 shared\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 host.json\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 package.json\nRun Code Online (Sandbox Code Playgroud)\n我做的另一件事是升级所有内容(Azure CLI、功能核心工具等)。
\n最后,我在文档中看到了这一点:
\n\n\n在预览期间,v4 模型要求您将应用设置AzureWebJobsFeatureFlags设置为EnableWorkerIndexing。有关详细信息,请参阅启用 v4 编程模型。
\n
要创建它,我需要运行:
\naz functionapp config appsettings set --name <FUNCTION_APP_NAME> \\\n--resource-group <RESOURCE_GROUP_NAME> \\\n--settings AzureWebJobsFeatureFlags=EnableWorkerIndexing\nRun Code Online (Sandbox Code Playgroud)\n然后我重新启动了功能应用程序,它终于工作了。
\n| 归档时间: |
|
| 查看次数: |
1889 次 |
| 最近记录: |