I found a way to deploy node app in iis route with iisnode and urlrewrite. it worked very well.could any one help to this problem.
Asked
Active
Viewed 719 times
-2
-
Does this answer your question? [How to serve NodeJS application from Windows Server Edition OS without using iisnode?](https://stackoverflow.com/questions/62450658/how-to-serve-nodejs-application-from-windows-server-edition-os-without-using-iis) – Lex Li Jun 19 '20 at 12:29
1 Answers
0
try to use the ng build command with href and use value of the virtual directory name.
below URL rewrite rule:
<rule name="StaticContent" patternSyntax="Wildcard">
<action type="Rewrite" url="public/{R:0}" logRewrittenUrl="true"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
</conditions>
<match url="*.*"/>
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="server.js"/>
</rule>
<rule name="SocketIO" patternSyntax="ECMAScript">
<match url="socket.io.+"/>
<action type="Rewrite" url="server.js"/>
</rule>
make sure iisnode module is installed.
IIS, Node.js, and Web Application with IISNode not configured right with Virtual Directory

Jalpa Panchal
- 8,251
- 1
- 11
- 26