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