Google App Engine and servers: how to configure it on a development server?

My configuration is backends.yaml

 backends: - name: mybackend class: B1 instances: 1 options: dynamic 

and app.yaml

 handlers: - url: http://mybackend.myapp.appspot.com script: mybackend.py login: admin 

By running it locally on the development server, I get this error:

Unable to set value 'http://mybackend.myapp.appspot.com' for attribute 'url': Value 'http://mybackend.myapp.appspot.com' for url does not match the expression '^ (?! \ ^) / |. | ((.). * (?! \ $). $ '

How to check the server on the development server?

+6
source share
1 answer

I believe the url should be the relative url of your site. The script should be run by a python function, not a file name. Therefore, your app.yaml should be.

 handlers: - url: /backend script: mybackend.myfunction login: admin 

Your backend and frontend instances use the same handlers; there is no way to distinguish between them.

+6
source

Source: https://habr.com/ru/post/911218/


All Articles