Skip to content

An example Cloudflare Worker API with a typesafe database

License

Notifications You must be signed in to change notification settings

ajzbc/workers-typesafe-db-example

Repository files navigation

Cloudflare Worker Typesafe DB Example

An example Cloudflare Worker API with a typesafe database

Stack

Setup

Create your database with Wrangler or through the Dashboard

Set your new database_name and database_id in wrangler.toml (reference)

Run the database migration

npm run migrate

Run locally

npm run dev

Note

Probably not the best setup, but just what works well for me :)