Files
aitbc/cli-dev/mock_server_8002.py
oib 210a77d860 refactor(cli): update API endpoints to v1 versioning and add dynamic port configuration to mock server
- Update mock-cli-server.py to use dynamic port allocation (8020-8050 range)
  - Add socket-based port availability checking
  - Generate dynamic config file at cli-dev/cli-staging-config-dynamic.yaml
  - Remove docstring header and shebang
  - Update endpoint paths: /v1/marketplace/gpus → /v1/marketplace/gpu/list, /v1/agent/workflows → /v1/agents/workflows

- Standardize all CLI command API
2026-03-04 23:24:10 +01:00

18 lines
383 B
Python

import uvicorn
from fastapi import FastAPI
app = FastAPI()
@app.get('/blockchain/status')
async def blockchain_status():
return {
'status': 'connected',
'height': 12345,
'hash': '0x1234567890abcdef',
'timestamp': '2026-03-04T17:10:00Z',
'tx_count': 678
}
if __name__ == '__main__':
uvicorn.run(app, host='127.0.0.1', port=8002)