chore: server bind host use configuration
This commit is contained in:
@@ -22,8 +22,9 @@ def main():
|
|||||||
vsdb.init()
|
vsdb.init()
|
||||||
people_store.init()
|
people_store.init()
|
||||||
conf = config.get_instance()
|
conf = config.get_instance()
|
||||||
|
host = conf.get('web_service', 'server_host', fallback='127.0.0.1')
|
||||||
port = conf.getint('web_service', 'server_port', fallback=8099)
|
port = conf.getint('web_service', 'server_port', fallback=8099)
|
||||||
uvicorn.run(api, host="127.0.0.1", port=port)
|
uvicorn.run(api, host=host, port=port)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
Reference in New Issue
Block a user