summaryrefslogtreecommitdiffstats
path: root/middleware/simulation_pr.js
diff options
context:
space:
mode:
Diffstat (limited to 'middleware/simulation_pr.js')
m---------middleware0
-rw-r--r--middleware/simulation_pr.js16
2 files changed, 16 insertions, 0 deletions
diff --git a/middleware b/middleware
deleted file mode 160000
-Subproject fd52f677a62a9a0728b4ab87d687e709f3e681d
diff --git a/middleware/simulation_pr.js b/middleware/simulation_pr.js
new file mode 100644
index 0000000..2645fb8
--- /dev/null
+++ b/middleware/simulation_pr.js
@@ -0,0 +1,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); \ No newline at end of file