Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

My configuration of 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

Running it localy on development server I get this error:

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

How can I test backend on development server?

like image 445
Petr Felzmann Avatar asked Mar 20 '12 16:03

Petr Felzmann


People also ask

How do I host with Google App Engine?

Go to the App Engine dashboard on the Google Cloud Platform Console and press the Create button. If you've not created a project before, you'll need to select whether you want to receive email updates or not, agree to the Terms of Service, and then you should be able to continue.

How the Google App Engine is used for the development of cloud application?

How is GAE used? GAE is a fully managed, serverless platform that is used to host, build and deploy web applications. Users can create a GAE account, set up a software development kit and write application source code. They can then use GAE to test and deploy the code in the cloud.

Which programming environment is used for Google App Engine?

Google App Engine provides four possible runtime environments for applications, one for each of four programming languages: Java, Python, PHP, and Go. The environment you choose depends on the language and related technologies you want to use for developing the application.


1 Answers

I believe the url should be the relative url from your site. The script should be the python function that's run, not the filename. So your app.yaml should be.

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

Your backend and frontend instances share the same handlers, there's no way to distinguish between them.

like image 180
dragonx Avatar answered Oct 23 '22 05:10

dragonx