title: Deploy Angular 5 build:ssr on Azure
body: <p>I've built my project starting form the angular universal template found here:
  <a href="https://github.com/angular/universal-starter" rel="nofollow noreferrer">universal-starter</a></p>
  
  <p>I am trying to deploy the ssr build as azure web app. My code is on VSTS.</p>
  
  <p>On my local machine I can run the following:</p>
  
  <ol>
  <li><code>npm install</code></li>
  <li><code>npm run build:ssr</code>. This produces the dist folder. </li>
  <li>I can then copy the dist folder somewhere else and run with the command below</li>
  <li><code>node server.js</code></li>
  </ol>
  
  <p>The app starts on port 4000 on local machine.</p>
  
  <p>So following the steps above, I've created a build process on my VSTS with the following tasks:</p>
  
  <ol>
  <li>An npm task that runs <code>npm install</code></li>
  <li>An npm task that run <code>npm run build:ssr</code></li>
  <li>An azure app service deploy task with the following configurations:
  
  <ul>
  <li>Package Folder: dist/</li>
  <li>web.config parameters: -Handler iisnode -NodeStartFile server.js -appType node</li>
  </ul></li>
  </ol>
  
  <p>Above process runs successfully, but when I navigate to <strong><a href="https://my-site-name.azurewebsites.net/" rel="nofollow noreferrer">https://my-site-name.azurewebsites.net/</a></strong> the site cannot be reached.</p>
  
  <p>How can I successfully deploy Angular 5 SSR on Azure?</p>
  
  <p><strong>UPDATE:</strong>
  Since this <a href="https://github.com/azure-appservice-samples/NodeJS-EmptySiteTemplate" rel="nofollow noreferrer">NodeJS-EmptySiteTemplate</a> runs on azure without error, I've done the following changes as per that project:</p>
  
  <ol>
  <li>That server is listening on process.env.PORT | 8080 </li>
  <li>There was a web.config file there that I was missing. I placed the same web-config file in the wwwroot.</li>
  </ol>
  
  <p>But not I am getting: "The page cannot be displayed because an internal server error has occurred." </p>