USAGE:
To use the Microservice for heatmaps:
1.) start the micro service in the dir with "cargo run"
2.) use JS to record mouse x,y data on clicks into a array.
3.) POST the data to the microservice using the format below:
4.)Get a heatmap back for your use.
The needed JS is in the script file, Once you add this to the head of your
html document you can use it to post the mouse event data to the heatmap
microservice.
Q:Anyway What is this?
A: A rust based microservice that will take mouse events and give back a
heatmap of usage.
Test command:
curl -XPOST -H "Content-type: application/json" -d '{"x_vals": [0, 400, 700, 500],"y_vals": [0, 400, 700, 500], "x_res": 1920, "y_res": 1080}' '127.0.0.1:8000/heatmap/file/test'
The command above will give you a heatmap SVG image when working locally
with a 1920x1080 resolusion.
What do I need to send?
- "x_vals": [array elements here], "y_vals": [array elements here]
- "x_res": screenx here, "y_res": screeny here
That's pretty much it for using my microservice. You can edit the "Rocket.toml"
File in order to change the port and IP is responds to.
Running rust microservice:
In the rocket_server folder in terminal enter "cargo run"
If you want a example of how to use the microservice look at
the files in the public_html folder.