Merge "Reporting docker deployment improvement"
[releng.git] / utils / test / reporting / api / server.py
1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
3 #
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 ##############################################################################
9 import tornado.ioloop
10 import tornado.web
11 from tornado.options import define
12 from tornado.options import options
13
14 from api.urls import mappings
15
16 define("port", default=8000, help="run on the given port", type=int)
17
18
19 def main():
20     tornado.options.parse_command_line()
21     application = tornado.web.Application(mappings)
22     application.listen(options.port)
23     tornado.ioloop.IOLoop.current().start()
24
25
26 if __name__ == "__main__":
27     main()