Package Exports
- @echelon-framework/mock-server
- @echelon-framework/mock-server/cli
Readme
@echelon-framework/mock-server
Standalone Node mock backend (HTTP + WebSocket) z deklaratywnym fixture.
Installation
npm install -g @echelon-framework/mock-server
echelon-mock-server --config mock-server.jsonConfig
mock-server.json:
{
port: 3001,
responses: {
clients: @file:./fixtures/clients.json,
transactions: @file:./fixtures/transactions.json
},
streams: {
rates.usdpln: {
simulate: {
kind: fx-random-walk,
mid: 4.0515, vol: 0.0003,
intervalMs: 350
}
}
}
}Endpoints
GET /health— healthcheckGET /api/:resource— fixture lookupPOST /api/:resource— echo + journalws://host:port/ws— subscribe{subscribe: channel}→{type: data, channel, data}