mirror of
https://github.com/FAUSheppy/skillbird
synced 2025-12-09 16:08:31 +01:00
make http api port configurable
This commit is contained in:
@@ -29,6 +29,8 @@ parser.add_argument('--cache-file', dest='cacheFile',\
|
|||||||
help="A cache file which makes restarting the system fast")
|
help="A cache file which makes restarting the system fast")
|
||||||
parser.add_argument('--ffa', action='store_const', default=False, const=True, \
|
parser.add_argument('--ffa', action='store_const', default=False, const=True, \
|
||||||
help="Use the free-for-all parser")
|
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__":
|
if __name__ == "__main__":
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@@ -49,7 +51,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
if not args.parse_only:
|
if not args.parse_only:
|
||||||
print("Starting network-listener(s)")
|
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()
|
NetworkListener.listen()
|
||||||
else:
|
else:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user