title: Deploying in GAE using Google cloud SDK shell
body: <p>I am trying to deploy my Nodejs application on Google App Engine. I am using Google Cloud SDK Shell for running the gcloud commands.</p>
  
  <p>First I ran gcloud init:</p>
  
  <pre><code>C:\Users\&lt;UserName&gt;\AppData\Local\Google\Cloud SDK&gt;gcloud init
  </code></pre>
  
  <p>After which I selected the cloud-project to use.
  Then I went to my project directory and ran the deploy command:</p>
  
  <pre><code>C:\Users\&lt;UserName&gt;\Documents\Hosting\api&gt;gcloud app deploy
  </code></pre>
  
  <p>But when I ran <strong>gcloud app browse</strong>, I am getting <strong>502 Bad Gateway</strong>.
  My project structure is :</p>
  
  <pre><code>-&gt;api
    |___node_modules
    |___models
    |___routes
    |___index.js
    |___app.yaml
    |___package.json
    |___package.lock.json
  -&gt;public
    |___index.html
    |___js
  </code></pre>
  
  <ol>
  <li>Where should I run the <strong>gcloud app deploy</strong> command?</li>
  <li>Should I change the project structure (How will google-sdk know my frontend files are in /public folder when I am running the command from /api)</li>
  </ol>
  
  <p><strong>Note</strong>: I am already running on port 8080 and have included "start" script in package.json file.</p>