Getting Started
1. Configure the gateway
Section titled “1. Configure the gateway”{ "Gateway": { "HttpUrl": "http://*:8080", "AgentSocketPath": "/var/run/pragmatic/agent.sock", "Routes": [ { "RouteId": "booking", "Path": "/booking/{**catch-all}", "Backend": "http://localhost:5010" } ] }}2. Run the executable
Section titled “2. Run the executable”dotnet run --project Pragmatic.Gateway/src/Pragmatic.Gateway/Pragmatic.Gateway.csprojOptional CLI overrides:
dotnet run --project Pragmatic.Gateway/src/Pragmatic.Gateway/Pragmatic.Gateway.csproj -- --listen http://*:8081 --agent-socket /tmp/pragmatic/agent.sock3. Add JWT or CORS if needed
Section titled “3. Add JWT or CORS if needed”Enable these only when you actually need them. The gateway can also run with a minimal route-only configuration.
4. Add resilience
Section titled “4. Add resilience”{ "Gateway": { "Resilience": { "Default": { "Timeout": "00:00:10", "FailureThreshold": 5, "BreakDuration": "00:00:30" } } }}5. Connect the Agent for dynamic routing
Section titled “5. Connect the Agent for dynamic routing”If the Agent is running and has gateway route data in KV state, the gateway reloads from Agent first and falls back to the static route list when needed.