make http api port configurable

This commit is contained in:
Insugeny_athq
2019-10-26 17:31:09 +02:00
parent e96c518216
commit fe6a6e5bb3

View File

@@ -29,6 +29,8 @@ parser.add_argument('--cache-file', dest='cacheFile',\
help="A cache file which makes restarting the system fast")
parser.add_argument('--ffa', action='store_const', default=False, const=True, \
help="Use the free-for-all parser")
parser.add_argument('--http-api-port', default=5000, \
help="Port to use for http-api port")
if __name__ == "__main__":
args = parser.parse_args()
@@ -49,7 +51,7 @@ if __name__ == "__main__":
if not args.parse_only:
print("Starting network-listener(s)")
Thread(target=httpAPI.app.run).start()
Thread(target=httpAPI.app.run,kwargs={'port':args.http_api_port}).start()
NetworkListener.listen()
else:
sys.exit(0)