You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constexpress=require('express');constserver=express();// We need to get the port that IISNode passes into us// using the PORT environment variable, if it isn't set use a default valueconstport=process.env.PORT||3000;// Setup a route at the index of our appserver.get('/',(req,res)=>{returnres.status(200).send('Hello World');});server.listen(port,()=>{console.log(`Listening on ${port}`);});
<rewrite><rules>// First we consider whether the incoming URL matches a physical file in the /public folder<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>// All other URLs are mapped to the Node.js application entry point<rule name="DynamicContent"><conditions><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/></conditions><action type="Rewrite" url="server.js"/></rule></rules></rewrite>