Read blog post to see a walkthrough of the code.
- Add ENVS to the example file
.env
go run main.go
- open a web browser and visit
http://localhost:8080/
- to write new blocks, send a
POST
request (curl -X POST -H "Content-Type: application/json" -d '{"BPM": 50}' http://127.0.0.1:8080
) tohttp://localhost:8080/
with a JSON payload withBPM
as the key and an integer as the value. For example:
{"BPM":50}
- Send as many requests as you like and refresh your browser to see your blocks grow! Use your actual heart rate (Beats Per Minute) to track it over time.