From 0ca2211f69093b3228f02016082e58499fd4996c Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Tue, 30 Jun 2026 16:13:42 +0200 Subject: [PATCH] reduced banner --- run.py | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/run.py b/run.py index 0b47f4e..97f042c 100644 --- a/run.py +++ b/run.py @@ -37,37 +37,26 @@ def get_port(): return "8000" def main(): - print("šŸš€ Starting NoteDiscovery...\n") - - # Check if requirements are installed + # Make sure runtime deps are present before invoking uvicorn. try: - import fastapi - import uvicorn + import fastapi # noqa: F401 + import uvicorn # noqa: F401 except ImportError: - print("šŸ“¦ Installing dependencies...") + print("Installing dependencies...") subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"]) - - # Create data directories + Path("data").mkdir(parents=True, exist_ok=True) Path("plugins").mkdir(parents=True, exist_ok=True) - - # Get port from config or environment + port = get_port() - - print("āœ“ Dependencies installed") - print("āœ“ Directories created") - print("\n" + "="*50) - print("šŸŽ‰ NoteDiscovery is running!") - print("="*50) - print(f"\nšŸ“ Open your browser to: http://localhost:{port}") - print("\nšŸ’” Tips:") - print(" - Press Ctrl+C to stop the server") - print(" - Your notes are in ./data/") - print(" - Plugins go in ./plugins/") - print(f" - Change port with: PORT={port} python run.py") - print("\n" + "="*50 + "\n") - - # Run the application + + # Short pre-launch banner. Detailed startup logs come from uvicorn / + # backend.main below (INFO: / WARNING: / ERROR:), so the user can tell + # exactly when the server is actually accepting connections. + print(f"šŸš€ NoteDiscovery → http://localhost:{port}") + print(f" notes: ./data/ plugins: ./plugins/ stop: Ctrl+C") + print() + subprocess.call([ sys.executable, "-m", "uvicorn", "backend.main:app",