DEV Community

Arm Dev
Arm Dev

Posted on

Deployment to GCP App Engine, but angular app not serving Server Side Rendered pages

Hi All

I have an angular app which is working well and serving Server Side Render as per expectation If I remove handlers from app.yml file. If I add handler as mentioned below it doesn't serve SSR.

angular #node #appengine #app_engine

runtime: nodejs16
env: standard
instance_class: F2
inbound_services:
  - warmup
handlers:
  - url: /(.*\.(gif|png|jpg|css|js|ico)(|\.map))$
    redirect_http_response_code: '301'
    static_files: dist/myApp/browser/\1
    upload: dist/myApp/browser/.*
  - url: /(.*\.(gif|png|jpg|css|js|ico)(|\.map))$
    redirect_http_response_code: '301'
    static_files: dist/myApp/server/\1
    upload: dist/myApp/server/.*
  - url: '/((?:assets|docs)/.*|favicon\.ico)'
    redirect_http_response_code: '301'
    static_files: dist/myApp/browser/\1
    upload: dist/myApp/browser/.*
  - url: /(.*)
    redirect_http_response_code: '301'
    static_files: dist/myApp/browser/index.html
    upload: dist/myApp/browser/index\.html
  - url: /(.*)
    static_files: dist/myApp/\1
    upload: dist/myApp/.*
  - url: .*
    script: auto


Enter fullscreen mode Exit fullscreen mode

Image description

Please help me to figure out the issue.

Thanks

Top comments (0)