Skip to content

🌤️ Kysely D1 Dialect for external fetch

Notifications You must be signed in to change notification settings

jill64/kysely-d1-external

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

npm i kysely-d1-external

Usage

import { D1ExternalDialect } from 'kysely-d1-external'
import { Kysely } from 'kysely'
import { fetch } from 'undici'

const db = new Kysely<Database>({
  dialect: new D1ExternalDialect({
    accountId: 'YOUR_CLOUDFLARE_ACCOUNT_ID',
    apiKey: 'YOUR_CLOUDFLARE_API_KEY',
    databaseUuid: 'YOUR_DATABASE_UUID'
  })
})