Skip to content

Instantly share code, notes, and snippets.

@i-b1
Last active August 26, 2021 21:30
Show Gist options
  • Save i-b1/49dbdae4daf3d4678fd636df5b2996c8 to your computer and use it in GitHub Desktop.
Save i-b1/49dbdae4daf3d4678fd636df5b2996c8 to your computer and use it in GitHub Desktop.
Google App Engine app.yaml settings file to serve multilingual Angular application
runtime: python27 # simplest hosting option in Google App Engine
api_version: 1
threadsafe: true #
service: myangularapp # could be 'default' if you have only one service
instance_class: F1 # minimal machine
automatic_scaling:
min_instances: 1 # always-on
max_instances: 1 # significant load is not expected for SPA app javascript package
handlers:
# serve assets directly
- url: /(.*\.(gif|png|jpg|css|js|woff|woff2|ttf|eot|svg|ico)(|\.map))$
static_files: myangularapp/\1
upload: myangularapp/(.*)(|\.map)
# html page for OIDC implicit flow token refresh
- url: /fr/silent-refresh.html
static_files: myangularapp/fr/silent-refresh.html
upload: myangularapp/fr/silent-refresh.html
- url: /en/silent-refresh.html
static_files: myangularapp/en/silent-refresh.html
upload: myangularapp/en/silent-refresh.html
# redirect all other request to index page
- url: /fr/(.*)
static_files: myangularapp/fr/index.html
upload: myangularapp/fr/index.html
- url: /en/(.*)
static_files: myangularapp/en/index.html
upload: myangularapp/en/index.html
# default root page to redirect to English or French home pages
- url: /(.*)
static_files: myangularapp/default.html
upload: myangularapp/default.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment