|
a/webui-standalone.py |
|
b/webui-standalone.py |
|
... |
|
... |
8 |
parser.add_argument('-a', '--addr', default='127.0.0.1',help='address to bind to [127.0.0.1]')
|
8 |
parser.add_argument('-a', '--addr', default='127.0.0.1',help='address to bind to [127.0.0.1]')
|
9 |
parser.add_argument('-p', '--port', default='8080', type=int, help='port to listen on [8080]')
|
9 |
parser.add_argument('-p', '--port', default='8080', type=int, help='port to listen on [8080]')
|
10 |
args = parser.parse_args()
|
10 |
args = parser.parse_args()
|
11 |
|
11 |
|
12 |
# change to webui's directory and import
|
12 |
# change to webui's directory and import
|
|
|
13 |
if os.path.dirname(__file__) != "":
|
13 |
os.chdir(os.path.dirname(__file__))
|
14 |
os.chdir(os.path.dirname(__file__))
|
14 |
|
15 |
|
15 |
# set up webui and run in own http server
|
16 |
# set up webui and run in own http server
|
16 |
webui.bottle.debug(True)
|
17 |
webui.bottle.debug(True)
|
17 |
webui.bottle.run(host=args.addr, port=args.port, reloader=False)
|
18 |
webui.bottle.run(host=args.addr, port=args.port, reloader=False)
|
18 |
|
19 |
|