title: App Engine Standard Python3 Handler Error Locally Only
body: <p>Running the dev server for App Engine standard python 3 is not routing requests properly.</p>
  
  <pre><code>dev_appserver.py app.yaml
  </code></pre>
  
  <p>The app.yaml file has 3 handlers.</p>
  
  <pre><code>runtime: python37
  instance_class: F1
  
  inbound_services:
    - warmup
  
  handlers:
  - url: /api/.*
    script: auto
    secure: always
  - url: /
    static_files: public/index.html
    upload: public/index.html
    secure: always
  - url: /
    static_dir: public
    secure: always
  </code></pre>
  
  <p>Locally the requests to /api/whatever all return 404 errors.
  When I deploy the app to GCP the requests succeed.</p>
  
  <p>The reasoning for my setup is statically hosting Angular 7 app while also hosting an API the angular app calls.</p>
  
  <p>Since the issue is only associated with the dev server, I think this is a bug. There is a similar python 2 example here: <a href="https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/angular/app.yaml" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/angular/app.yaml</a> </p>
  
  <p>Has anyone else run into this? Any workarounds? </p>
  
  <p><strong>Update</strong>: As requested in the comments here is an example main.py file.</p>
  
  <pre><code># [START gae_python37_app]
  import logging
  
  from flask import request, url_for
  from flask_api import FlaskAPI, status, exceptions
  
  # Create flask app
  app = FlaskAPI(__name__)
  
  @app.route("/api/whatever", methods=["GET"])
  def doSomething():
  
      response = {"message":"placeholder"}
  
      return response
  if __name__ == "__main__":
      # This is used when running locally only. When deploying to Google App
      # Engine, a webserver process such as Gunicorn will serve the app.
      app.run(host="127.0.0.1", port=8080, debug=True)
  # [END gae_python37_app]
  </code></pre>