summaryrefslogtreecommitdiffstats
path: root/middleware/simulation_pr.js
blob: 2645fb81cd990562ff197a2ff847d8001a52dcea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const axios = require('axios');

setInterval(() => {

  var rb = Math.floor(Math.random() * 49) + 1;
  var prData = {"rb": rb};

  console.log("Sending PR Data as kraken: "+prData.rb)
  axios.post('http://localhost:8042/prpost', prData)
      .then(function (response) {
          //console.log(response);
      })
      .catch(function (error) {
          console.log(error);
      });
}, 5000);