bootstrap: SQLite config, HTTP API on :3000, TCP on :2699, poll loops.
http-api: added serve() so bootstrap doesn't depend on axum directly.
polling: reads data sources from config, polls via http-json adapter,
pushes changed widgets to connected clients.
configure via API, e.g.:
curl -X POST localhost:3000/api/data-sources -H 'Content-Type: application/json' -d '{...}'
curl -X PUT localhost:3000/api/layout -H 'Content-Type: application/json' -d '{...}'
22 lines
436 B
TOML
22 lines
436 B
TOML
[package]
|
|
name = "http-api"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
domain.workspace = true
|
|
application.workspace = true
|
|
api-types.workspace = true
|
|
axum.workspace = true
|
|
tower-http.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tokio.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tokio.workspace = true
|
|
tower.workspace = true
|
|
serde_json.workspace = true
|
|
config-memory.workspace = true
|
|
tcp-server.workspace = true
|