0

I have a node.js app deployed in App Engine. And I have my API Gateway setup in-front to route to that app.

API Config(yaml)

paths:
  /hello:
    get:
      summary: Hello
      operationId: hello
      x-google-backend:
        address: <url_from_appengine>
        jwt_audience: <my_jwt_key>
      responses:
        '200':
          description: A successful response
          schema:
            type: string

When trying to access the app via the API Gateway URL + the path configured in the api config (https://my-gateway.gateway.dev/hello), I am getting a 404 error for the following static files, but I think I am getting to the page as I am seeing its page title and just a white page:

But when I tried accessing my app directly from the App Engine, there is no issue at all. Am I missing something on my API Config routing?

Below is my app.yaml and file structure.

app.yaml

runtime: nodejs14
service: my-app

- url: /
  static_files: build/index.html
  upload: build/index.html

- url: /(.*)/$
  static_files: build/\1/index.html
  upload: build/.*/index.html

- url: /(.*\.(css|js|json|gif|eot|png|jpg|jpeg|ico|svg|xml|woff|woff2))$
  static_files: build/\1
  upload: build/.*\.(css|js|json|gif|eot|png|jpg|jpeg|ico|svg|xml|woff|woff2)$

- url: /.*
  static_files: build/index.html
  upload: build/index.html
build
│
│───index.html
|───manifest.json
|───favicon.ico
│ 
└───static
│   │
│   └───css
│       │───styles.css
│       js
│       │───scripts.js

0 Answers0