Add js script for generating fake dat

This commit is contained in:
2024-06-16 23:59:47 +02:00
parent 369f8f2601
commit 04dcd4d642

20
fakegen.js Normal file
View File

@@ -0,0 +1,20 @@
const POCKETBASE_URL = `https://pocketbase-scratch.site.quack-lab.dev/api/collections/youtubedownload/records`;
async function main() {
let i = 0;
while (true) {
fetch(POCKETBASE_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
test: "test" + i,
}),
});
i += 1;
console.log("Sent request " + i);
await new Promise((resolve) => setTimeout(resolve, 1000));
}
}
main();