示例#1
0
    def inner_run(self, *args, **options):
        self.stdout.write(
            '\n>>>>>>>>>>>local server started @{}:{}<<<<<<<<<<< \n'.format(
                self.addr, self.port))

        try:
            from wsgiref import simple_server
            from rust import apps
            wsgi_application = apps.create_app()

            httpd = simple_server.make_server(self.addr, int(self.port),
                                              wsgi_application)
            httpd.serve_forever()
        except KeyboardInterrupt:
            sys.exit(0)
        except:
            print(unicode_full_stack())
示例#2
0
文件: client.py 项目: limoxi/icore
 def __init__(self, enforce_csrf_checks=True, *args, **kwargs):
     self.enforce_csrf_checks = enforce_csrf_checks
     from rust import apps
     self.app = apps.create_app()
示例#3
0
#coding:utf8

from rust import apps
app = apps.create_app()