summaryrefslogtreecommitdiffstats
path: root/middleware/simulation_pr.js
diff options
context:
space:
mode:
authorkrakenrf <>2022-10-27 12:28:39 +0200
committerkrakenrf <>2022-10-27 12:28:39 +0200
commitf59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d (patch)
treef2f98d0aa2cfcca2c722d68f197209d27b6a5312 /middleware/simulation_pr.js
parentgraph updates, apikey fix (diff)
downloadkrakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.tar
krakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.tar.gz
krakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.tar.bz2
krakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.tar.lz
krakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.tar.xz
krakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.tar.zst
krakensdr_pr-f59ea3e3ed8bb97fe1ae347e1d7b2119aa4f4f2d.zip
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