I developed an python webcrawler application based on scrapy and packaged it as a klein application (klein framework)
When I test it locally it everything works as expected, however when I deploy it to google app engine I get a "502 bad gateway". I found other mentions of the 502 error but nothing in relation to the klein framework I am using. So I was just wondering if app engine is maybe incompatible with it.
This is my folder structure
app
--app.yaml
--main.py
--requirements.txt
The contents of app.yaml
runtime: python37
instance_class: F2
handlers:
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
The contents of main.py
from klein import route, run
@route("/")
def landing_page(request):
return "HELLO"
if __name__== "__main__":
run(host='127.0.0.1', port=8080)