Add server control script and improve logging

\n- Add scripts/start-server.sh for easy server management\n- Add DLC_NO_COLOR environment variable support for clean logs\n- Update server.go to handle color/no-color logging\n- Add server.log and server.pid to .gitignore\n- Update README.md and AGENTS.md with server control documentation\n- Test all server control functions (start, stop, restart, status, logs, test)
This commit is contained in:
Gabriel Radureau
2026-04-03 16:06:00 +02:00
parent eaaa63d74e
commit 736ec9c996
5 changed files with 215 additions and 2 deletions

View File

@@ -85,7 +85,41 @@ DanceLessonsCoach/
## 🚀 Server Management
### Starting the Server
### Using the Server Control Script
A convenient shell script is provided for managing the server lifecycle:
```bash
# Navigate to project directory
cd /Users/gabrielradureau/Work/Vibe/DanceLessonsCoach
# Start the server
./scripts/start-server.sh start
# Check server status
./scripts/start-server.sh status
# Test API endpoints
./scripts/start-server.sh test
# View server logs
./scripts/start-server.sh logs
# Stop the server
./scripts/start-server.sh stop
```
**Server Control Script Commands:**
- `start` - Start the server in background with proper logging
- `stop` - Stop the server gracefully
- `restart` - Restart the server
- `status` - Check if server is running
- `logs` - Show recent server logs
- `test` - Test all API endpoints
### Manual Server Management
If you prefer manual control:
```bash
# Navigate to project directory