The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

539534 (6) [Avatar] Offline

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:

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:


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:


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

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


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


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.