539534 (6) [Avatar] Offline
#1
Hello,

I'm trying to deploy an angular 2 application to Windows Server 2016. I followed along in this video to get the server setup to handle angular applications:

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

Everything went smoothly.

Now I'm trying to deploy our full angular application and it's not working. I'm told I can take the contents of the dist folder and simply drop it onto the server in the root folder of the website. Here's the dist folder on my development machine:

image

I copy and paste this as-is directly into the root folder on the server. The root folder also contains an iisnode folder and node_modules folder. I then create the following web.config file and save it to the root folder on the server:

<configuration>
<system.webServer>

<!-- 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>
</configuration>

But this is what I get when I navigate to the site on the server:

image

It says it cannot find module 'compression'. I'm not sure what that is or how to make it available.

Please help me troubleshoot this. Thanks.