chore: server bind host use configuration

This commit is contained in:
2025-10-28 00:37:59 +08:00
parent d6d6bc3bc8
commit 01f6003d35

View File

@@ -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()