From 0470a17a0c3fbf58b5858591525749d5a001b0e0 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Fri, 6 Feb 2026 17:24:30 +0300 Subject: [PATCH] Update CLAUDE.md: Add server restart guidelines for development - Add new "Development Workflow" section - Document when server restart is required (Python/API changes) - Document when restart is NOT needed (static files, docs) - Provide step-by-step restart instructions for Windows and Linux/macOS - Add best practice to verify changes after restart before pushing Co-Authored-By: Claude Sonnet 4.5 --- CLAUDE.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 51be7e7..fc0f199 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,6 +26,55 @@ To remove the scheduled task: Unregister-ScheduledTask -TaskName "MediaServer" -Confirm:$false ``` +## Development Workflow + +### Server Restart After Code Changes + +**CRITICAL:** When making changes to backend code (Python files, API routes, service logic), the media server MUST be restarted for changes to take effect. + +**When to restart:** + +- Changes to any Python files (`*.py`) in the media_server directory +- Changes to API endpoints, routes, or request/response models +- Changes to service logic, callbacks, or script execution +- Changes to configuration handling or startup logic + +**When restart is NOT needed:** + +- Static file changes (`*.html`, `*.css`, `*.js`, `*.json`) - browser refresh is enough +- README or documentation updates +- Changes to install/service scripts (only affects new installations) + +**How to restart during development:** + +1. Find the running server process: + + ```bash + # Windows + netstat -ano | findstr :8765 + + # Linux/macOS + lsof -i :8765 + ``` + +2. Stop the server: + + ```bash + # Windows + taskkill //F //PID + + # Linux/macOS + kill + ``` + +3. Start the server again: + + ```bash + python -m media_server.main + ``` + +**Best Practice:** Always restart the server immediately after committing backend changes to verify they work correctly before pushing. + ## Configuration Copy `config.example.yaml` to `config.yaml` and customize.