Update AGENTS.md to use start-server.sh script for server management
This commit is contained in:
committed by
Gabriel Radureau
parent
f986711974
commit
c38d7c6d76
26
AGENTS.md
26
AGENTS.md
@@ -125,8 +125,8 @@ If you prefer manual control:
|
||||
# Navigate to project directory
|
||||
cd /Users/gabrielradureau/Work/Vibe/DanceLessonsCoach
|
||||
|
||||
# Run server in background
|
||||
go run cmd/server/main.go &
|
||||
# Run server in background using control script
|
||||
./scripts/start-server.sh start
|
||||
```
|
||||
|
||||
**Expected output:**
|
||||
@@ -162,20 +162,20 @@ The server supports flexible configuration through environment variables with th
|
||||
```bash
|
||||
# Custom port
|
||||
export DLC_SERVER_PORT=9090
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh start
|
||||
|
||||
# Custom host and port
|
||||
export DLC_SERVER_HOST="127.0.0.1"
|
||||
export DLC_SERVER_PORT=8081
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh start
|
||||
|
||||
# Custom shutdown timeout
|
||||
export DLC_SHUTDOWN_TIMEOUT=45s
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh start
|
||||
|
||||
# Enable JSON logging
|
||||
export DLC_LOGGING_JSON=true
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh start
|
||||
```
|
||||
|
||||
**Configuration File Support:**
|
||||
@@ -213,7 +213,7 @@ logging:
|
||||
**Verification:**
|
||||
```bash
|
||||
# Test with custom configuration
|
||||
DLC_SERVER_PORT=9090 DLC_SERVER_HOST="127.0.0.1" go run cmd/server/main.go
|
||||
DLC_SERVER_PORT=9090 DLC_SERVER_HOST="127.0.0.1" ./scripts/start-server.sh start
|
||||
|
||||
# Verify it's running on the custom port
|
||||
curl http://127.0.0.1:9090/api/health
|
||||
@@ -337,7 +337,7 @@ curl -s http://localhost:8080/api/health
|
||||
### 2. Start Development Server
|
||||
```bash
|
||||
cd /Users/gabrielradureau/Work/Vibe/DanceLessonsCoach
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh start
|
||||
```
|
||||
|
||||
### 3. Test API Endpoints
|
||||
@@ -362,8 +362,7 @@ go test ./pkg/greet/
|
||||
|
||||
### 6. Stop and Restart
|
||||
```bash
|
||||
pkill -f "go"
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh restart
|
||||
```
|
||||
|
||||
## 🧪 Testing
|
||||
@@ -502,9 +501,8 @@ kill -TERM $(lsof -ti :8080)
|
||||
# Check if running
|
||||
curl -s http://localhost:8080/api/health
|
||||
|
||||
# Restart server
|
||||
pkill -f "go"
|
||||
go run cmd/server/main.go &
|
||||
# Restart server using control script
|
||||
./scripts/start-server.sh restart
|
||||
```
|
||||
|
||||
### Dependency Issues
|
||||
@@ -655,7 +653,7 @@ defer cancel()
|
||||
### Common Commands
|
||||
```bash
|
||||
# Start server
|
||||
go run cmd/server/main.go &
|
||||
./scripts/start-server.sh start
|
||||
|
||||
# Test API
|
||||
curl http://localhost:8080/api/v1/greet/John
|
||||
|
||||
Reference in New Issue
Block a user