title: Deploying Sample Application to ELB returning 502 Bad Gateway
body: <p>I am trying to deploy my application to ELB using Code commit but when ever i try to access the webpage it gives me a <code>502 Bad Gateway.</code> I also tried using the default Node Sample Application which is by default provided in ELB , but it still comes up with  502 Bad Gateway error.</p>
  <p>To verify the code I logged into the ec2 instance to manually deploy the code but i cannot seem to find the code in <code>/var/app/current</code> there is no <code>/app/current</code> created in the root user. What am i missing.
  I have another ELB setup which was months back where i see the application is under the <code>/var/app/current</code> directory and its working fine. What is it that i am forgetting in this setup..</p>
  <p>My current package.json scripts.. I am not sure what is missing in the Sample Application too.</p>
  <pre><code>&quot;main&quot;: &quot;src/server/server.ts&quot;,
    &quot;scripts&quot;: {
      &quot;build&quot;: &quot;tsc&quot;,
      &quot;dist&quot;: &quot;sh ./scripts/dist.sh&quot;,
      &quot;trigger&quot;: &quot;node dist/server/server.js&quot;,
      &quot;start&quot;: &quot;npm install &amp;&amp; npm run build &amp;&amp; npm run dist &amp;&amp; npm run trigger&quot;,
      &quot;start:dev&quot;: &quot;nodemon src/server/server.ts&quot;
    },
  </code></pre>
  <blockquote>
  <p>Small Info - I see an iml file in my old elb project is that needed
  while processing eb deploy</p>
  </blockquote>
  <p><strong>Update</strong></p>
  <p>I even tried adding a port to the sample application of 3000 as my code was using that also tried 8081 and 5000. All resulting in either</p>
  <blockquote>
  <p>bad gateway</p>
  </blockquote>
  <p>or <code>This site can’t be reached refused to connect</code></p>