I recently set up a Node.js app in Google App Engine and it is running fine. I tried to add handlers so that all the requests to website can be redirected to https URLs. Below is my app.yaml
file
# [START runtime]
runtime: nodejs
vm: true
# [END runtime]
# Temporary setting to keep gcloud from uploading node_modules
skip_files:
- ^node_modules$
# [START handlers]
handlers:
- url: /.*
secure: always
# [END handlers]
When I tried to run the upload script, gcloud preview app deploy app.yaml
, it throws below exception:
ERROR: (gcloud.preview.app.deploy) An error occurred while parsing file: [/Users/rakesharidasan/BackwaterBreaks-UI-Release/app.yaml]
Unknown url handler type in line 14, column 17 (end of # [END handlers]).
I could see similar questions in StackOverflow, but many of them were related to indentation or white space issues. I believe my app.yaml got right indentation and I checked it through few online parsers eg - http://codebeautify.org/yaml-validator
The upload script will still run if I remove the handlers part from yaml.
Any ideas what goes wrong here?
The handler section must also specify a handler type, in this case a script or the main entry point to your app
Example:
- url: /.*
script: app.js
secure: always
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With