[英]Express 4 app doesn't work in Azure when deployed via GitHub
I'm working on an Express app that I initially created from the Basic Azure Node.js Express 4 Application template in Visual Studio. 我正在开发一个Express应用程序,我最初是从Visual Studio中的Basic Azure Node.js Express 4应用程序模板创建的。 In other words, it has the
web.config
modifications necessary to support Express 4's www\\bin
structure . 换句话说, 它具有支持Express 4的
www\\bin
结构所必需的web.config
修改 。
This app works fine when debugging via Visual Studio or running directly via Node command line. 通过Visual Studio调试或直接通过Node命令行运行时,此应用程序正常工作。 However, deployments from source control do not work when I hooked it up to the GitHub repo.
但是,当我将它连接到GitHub存储库时,源代码管理中的部署不起作用。 I can see the project root in the
site\\wwwroot
folder. 我可以在
site\\wwwroot
文件夹中看到项目根目录。 Even more strange, publishing directly from Visual Studio works. 更奇怪的是,直接从Visual Studio发布工作。
This turned out to be a simple oversight, but I feel that it can easily trip up others so I'll share the answer here. 事实证明这是一个简单的疏忽,但我觉得它很容易绊倒别人,所以我会在这里分享答案。 I'm using the Visual Studio
.gitignore
file from GitHub and it includes a rule to ignore [Bb]in/
as these are usually build output. 我正在使用GitHub中的Visual Studio
.gitignore
文件,它包含一个规则来忽略[Bb]in/
因为它们通常是构建输出。 My commits were not including the contents of /bin
, so my continuous deployment obviously wasn't picking these up either. 我的提交不包括
/bin
的内容,所以我的持续部署显然也没有选择它们。 Simply commenting out this line fixed this issue. 简单地评论这一行修复了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.