Added custom port and bind address args
This commit is contained in:
parent
b1ef248ee9
commit
ae359de562
5 changed files with 26 additions and 21 deletions
|
@ -50,13 +50,20 @@ class PrivateAPI:
|
|||
|
||||
self.startTime = epoch.get_epoch()
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
|
||||
bind_port = int(config.get('client.client.port', 59496))
|
||||
self.bindPort = bind_port
|
||||
|
||||
self.clientToken = config.get('client.webpassword')
|
||||
|
||||
self.host = httpapi.apiutils.setbindip.set_bind_IP(
|
||||
private_API_host_file)
|
||||
if config.get('general.bind_address'):
|
||||
with open(private_API_host_file, 'w') as bindFile:
|
||||
bindFile.write(config.get('general.bind_address'))
|
||||
self.host = config.get('general.bind_address')
|
||||
else:
|
||||
self.host = httpapi.apiutils.setbindip.set_bind_IP(
|
||||
private_API_host_file)
|
||||
logger.info('Running api on %s:%s' % (self.host, self.bindPort))
|
||||
self.httpServer = ''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue