Oh my god that's actually brilliant!! I kept thinking about how to store the data, handle migrations, and I totally missed out that I could just write the whole damn thing to a file. Thank you!
back
1 comments
If you're actually interested he's a write up showing the nginx config tricks (like proxy passing to itself to get the POST contents), http://superkuh.com/blog/2020-01-10-1.html
Cheers, what I'd probably do is the following:
- use my Go/Gin server
- host as a Docker container inside my Docker Swarm cluster managed by CapRover, so I don't have to pay for a new VM
- given a request from a new origin, my server creates a log file with the origin name and writes the data
- given a request from an existing origin, my server appends the data to the file
- I expose an endpoint with an api key that serves all the contents of a file for a given origin
Let me know if I missed something out though.
Just checked out your website by the way and wanted to say the comment system is really neat. Recommend everyone else to have a look.