38 lines
632 B
Markdown
38 lines
632 B
Markdown
# Example Shunt
|
|
|
|
Template for creating fake service connectors for testing.
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Run the shunt
|
|
python main.py
|
|
|
|
# Or with uvicorn
|
|
uvicorn main:app --port 8099 --reload
|
|
```
|
|
|
|
## Creating a New Shunt
|
|
|
|
1. Copy this directory:
|
|
```bash
|
|
cp -r shunts/example shunts/mercadopago
|
|
```
|
|
|
|
2. Edit `depot/responses.json` with fake responses
|
|
|
|
3. Update `main.py` to match the real vein's API endpoints
|
|
|
|
## Configuration
|
|
|
|
Edit `depot/responses.json` to configure fake responses:
|
|
|
|
```json
|
|
{
|
|
"GET /endpoint": {"response": "data"},
|
|
"POST /endpoint": {"success": true}
|
|
}
|
|
```
|
|
|
|
The shunt UI at `/` shows current configuration.
|