2013-07-24 1 views
3

여기 ProcfileHeroku에서 webapp2 (appengine)를 실행하는 방법은 무엇입니까?

내 프로젝트 파일

입니다

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는 응용 프로그램 오류

을 제공

내 프로젝트에 무슨 문제가 있습니까?

답변

4

파이썬으로 시작하기에 앞서 gunicorn 웹 서버가 필요하다고 생각됩니다. 당신의 requirements.txt 및 procfile 웹에서 gunicorn을 추가하십시오 : 주요 gunicorn : 응용 프로그램

링크 추가 잊어 버렸 : https://devcenter.heroku.com/articles/python

또한 여기

, 그것이에서 appengine dev에 서버처럼 동작하도록 설정 내 webapp2 - 스타터의되어 있지만, 앱 엔진 외부에서 작동합니다. https://github.com/faisalraja/webapp2-starter