Prerequisites
- Nats server
- Nats cli
- Node.js
- Clickhouse DB - optional if streaming using Nats-Clickhouse engine
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
$nats-server -c go-nats-angular/nats-server.conf
Should get an output like this: listen: 127.0.0.1:4222 jetstream: enabled websocket: { port: 8080 no_tls: true } authorization { default_permissions = {} }
$nats sub "hello.*"
$nats pub "geojson.feature" {{.Count}} --count 100000
###The UI integrates table data from clickhouse_table to show row data and uses go_backend micro service to get data.
Using Clickhouse - ./clickhouse server ./clickhouse client -- Can use UI
CLICKHOUSE UI - http://localhost:8123/play ————————————————————— //show databases; //show tables; //select * from first_table; //use nats; //select * from nats.clickhouse_table; // On terminal it shows as 2 dif sections //insert into nats.clickhouse_table(user_id, message) values(333, 'hello req res'); desc nats.clickhouse_table /* CREATE TABLE clickhouse_table ( user_id UInt32, message String, timestamp DateTime, metric Float32 ) ENGINE = MergeTree PARTITION BY toYYYYMM(timestamp) ORDER BY (user_id, timestamp); */