Tutorial: Trading Demo
An end-to-end change-driven app: live prices joined against a PostgreSQL database.
less than a minute
The repository ships several runnable examples. Each is self-contained and
demonstrates a different slice of @drasi/lib.
These live in examples/
and run with node after you build the addon (npm run build):
| Script | Shows |
|---|---|
quickstart.mjs | Load a cdylib source plugin, run a continuous query, read results. |
js-source.mjs | Drive a query from a JavaScript source with pushChange. |
js-reaction.mjs | Handle result diffs with a JavaScript reaction. |
Run one like this:
git clone https://github.com/drasi-project/drasi-nodejs.git
cd drasi-nodejs
npm install
npm run build
node examples/js-source.mjs
| Example | Shows |
|---|---|
| Trading demo | A full Electron + React desktop app: real PostgreSQL CDC, an in-process JS price feed, synthetic joins, live aggregations, and OCI plugins pulled at runtime. |
| Electron explorer | Browse and install plugins, then build and observe a topology on the embedded engine. |
Start with the Trading demo tutorial for a guided walkthrough of a realistic change-driven application.
An end-to-end change-driven app: live prices joined against a PostgreSQL database.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.