【发布时间】:2018-07-26 20:55:31
【问题描述】:
如何将 Powershell api 部署到 Azure Functions。 official documentation 只讨论部署 JavaScript 函数。
在通过 Azure Functions 扩展创建“项目”时,无法在语言选择期间选择“Powershell”。
这是从 Azure 门户部署时的默认 Powershell api。
# POST method: $req
$requestBody = Get-Content $req -Raw | ConvertFrom-Json
$name = $requestBody.name
# GET method: each querystring parameter is its own variable
if ($req_query_name)
{$name = $req_query_name}
Out-File -Encoding Ascii -FilePath $res -inputObject "Hello $name"
我尝试使用 VSC Azure Function 的“部署”按钮直接部署以下代码。但我收到以下错误。
Unable to write Workspace settings because no workspace is opened. Please open a workspace first and try again
【问题讨论】:
标签: powershell azure visual-studio-code azure-functions