install webapp2 on Linux outside google app engine.
Reference: https://webapp-improved.appspot.com/tutorials/quickstart.nogae.html
Step 1: install pip
Step 2:
$ pip install WebOb $ pip install Paste $ pip install webapp2
Step 3:
write a main.py
import webapp2 class HelloWebapp2(webapp2.RequestHandler): def get(self): self.response.write(‘Hello, webapp2!‘) app = webapp2.WSGIApplication([ (‘/‘, HelloWebapp2), ], debug=True) def main(): from paste import httpserver httpserver.serve(app, host=‘127.0.0.1‘, port=‘8080‘) if __name__ == ‘__main__‘: main()
Step 4:
Run
$ python main.py
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。