-
Copy the example configuration:
cp config.toml.example config.toml
-
Edit
config.tomlwith your ForgeCode API credentials:[forge_api] base_url = "https://api.forgecode.com" auth_token = "your-actual-token"
-
Start the service:
docker-compose up -d
-
Verify the service is running:
curl http://localhost:8080/health
-
Build the application:
cargo build --release
-
Create a configuration file:
cp config.toml.example config.toml # Edit config.toml with your settings -
Run the application:
FORGE_CONFIG_PATH=./config.toml ./target/release/forge-gateway
FORGE_CONFIG_PATH: Path to configuration file (default:./config.toml)RUST_LOG: Logging level (default:info)
The service provides a health endpoint at /health that returns:
200 OKwhen service is healthy503 Service Unavailablewhen service is unhealthy
The service includes:
- Structured JSON logging
- Health check endpoint
- Rate limiting (1000 requests/minute)
- CORS support for web applications
- Security: Set proper CORS origins and rate limits
- Authentication: Use environment variables for API tokens
- Monitoring: Set up log aggregation and alerting
- Scaling: Use load balancer for multiple instances
- Backup: Regularly backup configuration and data volumes