core rest - added node command api, changed default rest address to the local machine to avoid external connections

This commit is contained in:
bharnden 2018-11-25 12:14:50 -08:00
parent 56f9e6ec8a
commit 9b56b489fa
2 changed files with 16 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import os
import sys
from flask import Flask
from flask import jsonify
@ -84,4 +85,7 @@ def handle_error(e):
if __name__ == "__main__":
websocket_routes.socketio.run(app, host="0.0.0.0", debug=True)
host = "127.0.0.1"
if len(sys.argv) == 2:
host = sys.argv[1]
websocket_routes.socketio.run(app, host=host, debug=True)