标签:
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
install webapp2 on Linux outside google app engine.
标签:
原文地址:http://www.cnblogs.com/miaoz/p/4493885.html