title: APP Engine listening to Port 3000 giving 502 Bad Gateway error
body: <p>I am new to node.js coding. I am learning to build a app I want to host on GCP App engine.
  I have created a Node.js code which has hard requirement to listen to port 3000.</p>
  <pre><code>const dotenv = require('dotenv').config();
  const express = require('express');
  const app = express();
  const crypto = require('crypto');
  const cookie = require('cookie');
  const nonce = require('nonce')();
  const querystring = require('querystring');
  const request = require('request-promise');
  const { Console } = require('console');
  // const PORT = process.env.PORT || 3000;
  const PORT = 3000;
  
  app.get('/', (req, res) =&gt; {
    res.send('Hello App Engine!');
  });
  
  </code></pre>
  <p>On Yaml file I have specifically added ports to forward.</p>
  <pre><code>network:
    forwarded_ports:
      - 3000/tcp
  </code></pre>
  <p>unless I dont use 8080 port, app engine is failing with 502 Bad Gateway.</p>
  <p>Is there a way I can use Port 3000 in App engine.
  It works if I change the Port to 8080. But I want this to be at 3000.</p>
  <p>I created firewall rules</p>
  <p><a href="https://i.stack.imgur.com/E1nPs.png" rel="nofollow noreferrer">enter image description here</a></p>