mirror of
https://github.com/ringhyacinth/Star-Office-UI
synced 2026-04-21 13:27:19 +00:00
Merge pull request #62 from Jah-yee/fix/issue-31-port-and-state-hints
fix: add startup hints for port and state source (fixes #31)
This commit is contained in:
commit
a139bb05b6
2 changed files with 15 additions and 0 deletions
|
|
@ -2058,6 +2058,10 @@ if __name__ == "__main__":
|
|||
print("=" * 50)
|
||||
print(f"State file: {STATE_FILE}")
|
||||
print(f"Listening on: http://0.0.0.0:{backend_port}")
|
||||
if backend_port != 18791:
|
||||
print(f"(Port override: set STAR_BACKEND_PORT to change; current: {raw_port})")
|
||||
else:
|
||||
print("(Set STAR_BACKEND_PORT to use a different port, e.g. 3009)")
|
||||
mode = "production" if is_production_mode() else "development"
|
||||
print(f"Mode: {mode}")
|
||||
if is_production_mode():
|
||||
|
|
|
|||
|
|
@ -262,6 +262,17 @@ def do_push(local, status_data):
|
|||
def main():
|
||||
local = load_local_state()
|
||||
|
||||
# Startup hint for state source and URL (helps with port/state issues, e.g. issue #31)
|
||||
if LOCAL_STATE_FILE:
|
||||
print(f"State file: {LOCAL_STATE_FILE}")
|
||||
else:
|
||||
first_existing = next((p for p in DEFAULT_STATE_CANDIDATES if p and os.path.exists(p)), None)
|
||||
if first_existing:
|
||||
print(f"State file (auto): {first_existing}")
|
||||
else:
|
||||
print("State file: auto-discover (set OFFICE_LOCAL_STATE_FILE if state not found)")
|
||||
print(f"Local status URL: {LOCAL_STATUS_URL} (set OFFICE_LOCAL_STATUS_URL if backend uses another port)")
|
||||
|
||||
# 先确认配置是否齐全
|
||||
if not JOIN_KEY or not AGENT_NAME:
|
||||
print("❌ 请先在脚本开头填入 JOIN_KEY 和 AGENT_NAME")
|
||||
|
|
|
|||
Loading…
Reference in a new issue