Closed Brayden closed 6 months ago
Adding a new connection type that directly utilizes the Cloudflare D1 HTTP API for running SQL queries against your D1 database.
NOTE: The Cloudflare D1 HTTP API does not support CORS so the queries must be initiated on a server and not from a browser.
Connection
CloudflareD1Connection
./playground
node index.js
localhost:4000
Query: INSERT INTO table_name (something, another, id) VALUES (?, ?, ?) Params: [ 'hello', 'world', 3 ]
Purpose
Adding a new connection type that directly utilizes the Cloudflare D1 HTTP API for running SQL queries against your D1 database.
NOTE: The Cloudflare D1 HTTP API does not support CORS so the queries must be initiated on a server and not from a browser.
Tasks
Connection
interface forCloudflareD1Connection
Verify
./playground
folder run the Node server withnode index.js
CloudflareD1Connection
objectlocalhost:4000
in your browserBefore
After