()
| 29 | |
| 30 | |
| 31 | def main(): |
| 32 | parse_command_line() |
| 33 | app = tornado.web.Application( |
| 34 | [ |
| 35 | (r"/", MainHandler), |
| 36 | (r"/socket.io/", socketio.get_tornado_handler(sio)), |
| 37 | ], |
| 38 | template_path=os.path.join(os.path.dirname(__file__), "templates"), |
| 39 | static_path=os.path.join(os.path.dirname(__file__), "static"), |
| 40 | debug=options.debug, |
| 41 | ) |
| 42 | app.listen(options.port) |
| 43 | tornado.ioloop.IOLoop.current().start() |
| 44 | |
| 45 | |
| 46 | if __name__ == "__main__": |