mleku ✝Ⓐ☯︎ @mleku - 17d
#realy now has an export function baked into the network handler, version v1.0.16 on the network port, which defaults to localhost:3337 you can now send a request using curl or similar, and it spits back all of the events in the database i don't yet know what tool i should use for pushing a `.jsonl` file up to the relay to add events, #asknostr if anyone knows a good tool for pushing text files via http
got the thing working ``` $ curl -F "[email protected]" 127.0.0.1:3337/import ``` i mean, just the transfer part, right now i literally just added a call that writes the received jsonl file to the stderr but the above standart command does the trick i don't think i should complicate things by writing a command that does this dumb simple thing but instead just write in the docs "to upload a jsonl dump to your relay, use curl like this
oh yeah, that would be a neat thing, but separate the hard part is you can't just open this up to all and sundry or you get a DoS attack the way to do it would be you send a DM with a command, and it gives you a one time URL that the relay knows is authorised and then it would be like: `curl https://realy.example.com/export/ao-eu98a-o9e8u-a9oe8u>test.jsonl`
yeah, it can even be downloaded by a web browser also, just to mention, but it has to be presaged by an authed DM to allow it or it's a problem
i'm gonna add these things bit by bit... tomorrow i'll finish the import code then i can do some cool things with that to test my relay... i have a gigadump of events that would be good for stress testing that semisol gave me, bless him