diff --git a/src/pages/index.astro b/src/pages/index.astro index be517ab..8b00997 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -49,12 +49,17 @@ import Layout from '../layouts/Layout.astro'; terminal -
$ devproxy
-Listening on 127.0.0.1:8000...
-200 GET https://api.contoso.com/users
-429 GET https://api.contoso.com/data ← throttled
-500 POST https://api.contoso.com/items ← server error
+❯ devproxy
+info Dev Proxy listening on 127.0.0.1:8000...
+ +req GET https://api.contoso.com/posts
+skip GenericRandomErrorPlugin: Pass through
+pass Passed through
+ +req GET https://api.contoso.com/posts
+skip RetryAfterPlugin: Request not throttled
+oops GenericRandomErrorPlugin: 429 429
Resilience Testing
-API Mocking
+- Simulate random errors, timeouts, and failures for any API — without touching your code. Build more robust apps and never lose your customers' data. + Stand up a fully-functional CRUD API without writing a single line of server code. Design, prototype, and build your frontend in parallel with your backend.
- + Learn more →// Your app makes a normal API call
-fetch('https://api.contoso.com/orders')
-// Dev Proxy intercepts and returns
-500 Internal Server Error
-429 Too Many Requests
-503 Service Unavailable
-// Does your app handle it?
+// customers-api.json — CrudApiPlugin
+"baseUrl": "https://api.contoso.com/customers"
+getAll GET /customers
+getOne GET /customers/{id}
+create POST /customers
+merge PATCH /customers/{id}
+delete DELETE /customers/{id}
+// Defined in JSON. Zero server code.
Rate Limit Simulation
-Resilience Testing
+- Simulate rate limiting and throttling responses before they happen in production. Avoid getting blocked and deliver a smoother experience for your users. + Simulate random errors, timeouts, and failures for any API — without touching your code. Build more robust apps and never lose your customers' data.
- + Learn more →Retry-After: 30s
-// errors-contoso-api.json
+"url": "https://api.contoso.com/*"
+"responses":
+500 Internal Server Error
+429 Too Many Requests
+503 Service Unavailable
+// Random errors at configured failure rate.
API Mocking
-AI / LLM Testing
+- Stand up a fully-functional CRUD API without writing a single line of server code. Design, prototype, and build your frontend in parallel with your backend. + Route OpenAI and Azure OpenAI API calls to a local language model during development. Get real responses while building your AI-powered apps — without spending tokens.
- + Learn more →// No backend? No problem.
-GET /products → list
-POST /products → create
-PUT /products/:id → update
-DEL /products/:id → delete
-// Zero lines of server code.
+// Your app calls OpenAI
+POST /v1/chat/completions
+// Dev Proxy routes to local LLM
+→ Ollama (llama3.2)
+200 { "choices": [{ "message": ... }] }
+// Real responses. Zero API costs.
Latency Simulation
-Rate Limit Simulation
+- Add realistic latency to any API response. Make sure your loading states, timeouts, and cancellation logic work as expected. + Simulate rate limiting and throttling responses before they happen in production. Avoid getting blocked and deliver a smoother experience for your users.
- + Learn more →Run Dev Proxy as part of your CI/CD pipeline to catch API integration issues before they reach production. Works with GitHub Actions, Azure DevOps, and more.
- + Learn more →# .github/workflows/test.yml
steps:
-- name: Install Dev Proxy
-run: bash install.sh
-- name: Run tests with proxy
-run: devproxy & npm test
+- name: Setup Dev Proxy
+uses: dev-proxy-tools/actions/setup@v1
+- name: Run tests
+run: npm test
+- name: Stop Dev Proxy
+uses: dev-proxy-tools/actions/stop@v1
✓ 42 passed, 0 failed