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 <noreply@anthropic.com>
This commit is contained in:
49
CLAUDE.md
49
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 <process_id>
|
||||
|
||||
# Linux/macOS
|
||||
kill <process_id>
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user