簡體   English   中英

如何從 Visual Studio 2019 將 Node.js 應用部署到 Azure 應用服務?

[英]How do I deploy a Node.js app to a Azure App Service from Visual Studio 2019?

我創建了一個簡單的 node.js 快速應用程序,我想在 Azure Windows 應用程序服務中托管它。 Azure App Service資源創建成功,項目使用“Node.js Web Application”模板創建。

當我嘗試從 Visual Studio 2019 進行部署時,收到以下錯誤消息:

在項目中找不到 web.config,要創建一個項目以部署到 Microsoft Azure,您必須創建一個 Azure Node.js 項目。

我應該使用其他模板嗎? 如果沒有,web.config 文件的內容是什么樣的,所以我可以嘗試手動創建它。

  • 要將 Node.js 應用程序部署到 Azure,您需要 select Azure Node.js Web Application模板。
  • 您已選擇 Node.js Web 應用程序。
  • 如果你 select Azure Node.js App ,默認會生成 web.config 。
  • 將已經創建的源文件復制到新創建的 Azure node.js 應用程序中。

在此處輸入圖像描述

更新

  • 安裝 Visual Studio 時,您可能沒有選擇 Node.js 開發選項。 單擊安裝更多工具和功能選項和 select Node.js 並更新 VS

在此處輸入圖像描述

在此處輸入圖像描述 在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM