Periodically sends HTTP requests with data to subscribers. Useful for simulating constant data influx
In this concrete implementation, it reads data from the DB (see data/database.sql) and periodically sends it to configured URLs;
-
$ git clone https://github.com/dejan7/HTTPDataEmitter
-
$ cd HTTPDataEmitter && npm install
-
Execute data/database.sql and populate your DB
-
Copy
config.example.js
intoconfig.js
and configure it-
SUBSCRIBERS - list of URLs to send data to
-
SUBSTATIONS - list of substations with following params
-
id - location_id in data/database.sql
-
frequency - how often will data be read for this location (in seconds)
-
chanceToSkip - chance between 0.00 and 1.00 to skip sending in a given iteration
-
-
Start with
$ node DataEmitter.js
Student project - final work //TODO