Python 如何在Heroku中运行webapp2(appengine)?
这是我的项目文件 程序文件Python 如何在Heroku中运行webapp2(appengine)?,python,google-app-engine,heroku,webapp2,Python,Google App Engine,Heroku,Webapp2,这是我的项目文件 程序文件 web: python main.py requirement.txt webapp2==2.3 main.py import webapp2 class MainHandler(webapp2.RequestHandler): def get(self): self.response.write("hello") app = webapp2.WSGIApplication([ ('/', MainHandler) ], de
web: python main.py
requirement.txt
webapp2==2.3
main.py
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write("hello")
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
heroku仍然给出了一个应用程序错误
我的项目出了什么问题?基于他们对python的入门,您似乎需要gunicorn web服务器。尝试在requirements.txt和procfile web:gunicorn main:app中添加gunicorn 忘记添加链接: 这也是我的webapp2入门版,它的设置类似于appengine开发服务器,但在appengine之外工作。