ajzbc / workers-typesafe-db-example

An example Cloudflare Worker API with a typesafe database

Home Page:https://example.ajzbc.com/post/all

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudflare Worker Typesafe DB Example

An example Cloudflare Worker API with a typesafe database

Demo

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 :)

About

An example Cloudflare Worker API with a typesafe database

https://example.ajzbc.com/post/all

License:MIT License


Languages

Language:TypeScript 100.0%