How Do I Create an endpoint using Cloudflare D1 and workers that returns the entire table as JSON when fetched?
I want to know what code I need to put in the workers.js file to return the entire table from a D1 database as JSON when fetched.
I need this so that on an HTML page, I can fetch the JSON using the public read-only endpoint, and then I already have the rest of the code working, where it creates a array using the JSON.
In other words, I want to create a read-only D1 worker that will replace my current nocodb endpoint: