dejan7 / HTTPDataEmitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTPDataEmitter

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;

How to use

  1. $ git clone https://github.com/dejan7/HTTPDataEmitter

  2. $ cd HTTPDataEmitter && npm install

  3. Execute data/database.sql and populate your DB

  4. Copy config.example.js into config.js and configure it

    1. SUBSCRIBERS - list of URLs to send data to

    2. 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

  5. Start with $ node DataEmitter.js

INFO

Student project - final work //TODO

About


Languages

Language:JavaScript 100.0%