A lightweight Node.js API testing server for exercising HTTP requests and inspecting traffic. Perfect for integration testing, debugging API calls, and verifying authentication flows.
- ✅ All HTTP methods supported (GET, POST, PUT, DELETE, PATCH, etc.)
- ✅ CORS enabled for frontend testing
- ✅ Detailed request/response logging (5-minute retention for security)
- ✅ Material Design 3 UI for landing page and monitoring dashboard
- ✅ Real-time monitoring with auto-refresh
- ✅ Swagger/OpenAPI documentation
- ✅ Built-in metrics and performance insights
- ✅ Authentication header capture
- ✅ Comprehensive IP address detection (for whitelisting)
- Node.js 18+
- npm
# Install dependencies
npm install
# Create .env file (optional, for ngrok)
cp .env.example .env
# Start server
npm startThe server will start on http://localhost:3030
All endpoints return:
{
"message": "Hello {timestamp}",
"type": "HTTP_METHOD",
"youSentMe": "request_body_if_any",
"requestDetails": {
"timestamp": "2025-09-25T03:02:01.528Z",
"method": "POST",
"url": "/api/test?debug=true",
"path": "/api/test",
"query": { "debug": "true" },
"headers": { ... },
"authenticationHeaders": { "authorization": "Bearer token" },
"body": { ... },
"contentType": "application/json",
"userAgent": "curl/8.7.1",
"ip": "::1",
...
},
"server": {
"name": "SayHello API Testing Server",
"version": "1.0.0",
"port": 3030,
"timestamp": "2025-09-25T03:02:01.528Z"
}
}/- Landing page with integration instructions/monitor.html- Real-time monitoring dashboard/docs- Swagger API documentation/health- Health check endpoint/metrics- Performance metrics and request logs/echo- Echo endpoint (returns request details)/test- Simple test endpoint
# GET request
curl http://localhost:3030/
# POST with JSON body and auth headers
curl -X POST http://localhost:3030/test \
-H "Content-Type: application/json" \
-H "Authorization: Bearer test-token-123" \
-H "X-API-Key: my-secret-key" \
-d '{"name": "Test User", "action": "testing"}'
# DELETE with query parameters
curl -X DELETE "http://localhost:3030/api/users/123?debug=true" \
-H "Authorization: Basic dGVzdDpwYXNzd29yZA=="
# Health check
curl http://localhost:3030/healthThis service automatically deploys to Azure Container Apps when you push to the main branch.
- Resource Group:
rg-alterspective-utilities-prod - Container Registry:
acralterspectiveutils.azurecr.io - Container App:
ca-sayhello-prod - Environment:
cae-alterspective-utilities-prod
az ad sp create-for-rbac \
--name "github-actions-sayhello" \
--role contributor \
--scopes /subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/rg-alterspective-utilities-prod \
--sdk-authCopy the entire JSON output.
Go to your GitHub repository → Settings → Secrets and variables → Actions
Add the following secrets:
- AZURE_CREDENTIALS: Paste the JSON output from step 1
- NGROK_AUTHTOKEN: Your ngrok auth token (from .env file)
- NGROK_DOMAIN: Your ngrok domain (e.g.,
sayhello.alterspective.io)
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -u origin mainThe GitHub Actions workflow will automatically:
- Build a Docker image
- Push to Azure Container Registry
- Deploy to Azure Container Apps
- Output the public URL
If you need to deploy manually:
# Build and push Docker image
az acr build \
--registry acralterspectiveutils \
--image sayhello:latest \
--file Dockerfile .
# Deploy to Container App
az containerapp create \
--name ca-sayhello-prod \
--resource-group rg-alterspective-utilities-prod \
--environment cae-alterspective-utilities-prod \
--image acralterspectiveutils.azurecr.io/sayhello:latest \
--target-port 3030 \
--ingress external \
--min-replicas 0 \
--max-replicas 3 \
--cpu 0.5 \
--memory 1GiSee the integration instructions on the landing page at / for step-by-step guidance on configuring this service with ShareDo's Linked Services.
- Request logs containing sensitive data (headers, bodies, tokens) are automatically deleted after 5 minutes
- Do not commit
.envfiles to version control - Azure secrets are stored securely in GitHub Secrets and Azure Key Vault
Azure Container Apps scales to zero when not in use, so you only pay for:
- Execution time when the service is actively handling requests
- First 180,000 vCPU-seconds/month are free
- First 360,000 GiB-seconds/month are free
- First 2 million requests/month are free
For infrequent usage (once every 2 months), costs should be minimal or free.
Access the monitoring dashboard at /monitor.html to see:
- Real-time request/response logs
- Performance metrics
- Memory usage
- Request rates
Copyright © Alterspective