python - How to modify the code when using wsgifunc to run web.py under linux
黄舟
黄舟 2017-05-16 13:34:14
0
1
586

rt,

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
PHPzhong
# -*- coding: utf-8 -*-

import web

urls = ('/', 'Hello')

class Hello(object):
    def GET(self):
        return 'Hello world'

app = web.application(urls, globals())


from wsgiref.simple_server import make_server

if __name__ == '__main__':
    server = make_server('0.0.0.0', 8080, app.wsgifunc())
    server.serve_forever()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template