1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from tornado.options import define
12 from tornado.options import options
14 from api.urls import mappings
16 define("port", default=8000, help="run on the given port", type=int)
20 tornado.options.parse_command_line()
21 application = tornado.web.Application(mappings)
22 application.listen(options.port)
23 tornado.ioloop.IOLoop.current().start()
26 if __name__ == "__main__":