Angular 2站点将无法在Windows Server 2016中运行

时间:2018-01-24 18:14:43

标签: angular windows-server-2016

我正在关注此视频教程,以了解如何将Angular 2站点部署到Windows Server 2016计算机:

https://www.youtube.com/watch?v=JUYCDnqR8p0

视频建议的所有内容都有效。我已经有了IISNode,Node Express和启动器Angular 2应用程序。

现在我想部署更复杂的Angular 2应用程序。它最初设计为在Linux上运行,因此我不确定要在Windows Server 2016上运行它的调整。我被告知我可以将dist和plop的内容放入Windows Server 2016上的网站文件夹中那就是我做的。

但是,当我在服务器上浏览它时,我得到了这个:

enter image description here

堆栈跟踪告诉我它已经到了server.js,所以这是一个好兆头。事情似乎是污垢,当它寻找module.js。我在服务器上搜索了module.js并找不到它。堆栈跟踪结束时无法找到模块“压缩”。 < - 我不确定这是什么。

这是我的web.config:

    

<!-- indicates that the server.js file is a node.js application to be handled by the iisnode module -->
<handlers>
    <add name="iisnode" path="server/server.js" verb="*" modules="iisnode" />
</handlers>

<rewrite>
    <rules>
        <rule name="sendToNode">
            <match url="/*" />
            <action type="Rewrite" url="server/server.js" />
        </rule>
    </rules>
</rewrite>

</system.webServer>

有人可以帮我解决这个问题吗?

0 个答案:

没有答案