This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cloudflare from "cloudflare"; | |
| import "dotenv/config"; | |
| const api_token = process.env.CLOUDFLARE_D1_ACCESS_TOKEN; | |
| const account_id = process.env.CLOUDFLARE_ACCOUNT_ID; | |
| const database_id = process.env.CLOUDFLARE_DB_ID; | |
| const client = new Cloudflare({ apiToken: api_token }); | |
| async function runQuery(sql, params = []) { |