-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcityfix.py
29 lines (24 loc) · 860 Bytes
/
cityfix.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import tornado.ioloop
import tornado.web
import tornado.options
import tornado.httpserver
import sys
import os
import os.path
from client.router import urls
application = tornado.web.Application()
class ConsoleApplication(tornado.web.Application):
def __init__(self):
setting = dict(
template_path=os.path.join(os.path.dirname(__file__), "client/templates"),
static_path=os.path.join(os.path.dirname(__file__), "client/static"),
appversion="1.0.0")
tornado.web.Application.__init__(self, urls, **setting)
def main():
args = sys.argv
tornado.options.parse_command_line(args)
console_server = tornado.httpserver.HTTPServer(ConsoleApplication())
console_server.listen(80, '*')
tornado.ioloop.IOLoop.current().start()
if __name__ == "__main__":
main()