ExpressEndpoint adapter to expose your agent network as an Express route.
Setup
- Install m4trix and Express:
- Create your Express app:
Important
- body-parser — Use
express.json()(or equivalent) so POST bodies are parsed. The handler readsreq.bodyfor the payload. - Client disconnect — The handler listens for the
closeevent and cleans up the stream. - Compression — If using compression middleware, the handler calls
res.flush()when available for better streaming.

