{"id":15723477,"url":"https://github.com/ajzbc/workers-typesafe-db-example","last_synced_at":"2025-05-12T20:47:23.828Z","repository":{"id":97695538,"uuid":"587660899","full_name":"ajzbc/workers-typesafe-db-example","owner":"ajzbc","description":"An example Cloudflare Worker API with a typesafe database","archived":false,"fork":false,"pushed_at":"2024-07-30T09:19:09.000Z","size":24,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T03:55:23.123Z","etag":null,"topics":["cloudflare","cloudflare-workers","d1","example","hono","kysely","kysely-dialect","sql","sqlite","typesafe","typescript"],"latest_commit_sha":null,"homepage":"https://example.ajzbc.com/post/all","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajzbc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T09:29:26.000Z","updated_at":"2024-11-29T08:46:37.000Z","dependencies_parsed_at":"2024-10-24T17:47:24.534Z","dependency_job_id":"8136444d-e5fa-48f9-961f-1b1cce774d9a","html_url":"https://github.com/ajzbc/workers-typesafe-db-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzbc%2Fworkers-typesafe-db-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzbc%2Fworkers-typesafe-db-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzbc%2Fworkers-typesafe-db-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzbc%2Fworkers-typesafe-db-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajzbc","download_url":"https://codeload.github.com/ajzbc/workers-typesafe-db-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253819392,"owners_count":21969345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","cloudflare-workers","d1","example","hono","kysely","kysely-dialect","sql","sqlite","typesafe","typescript"],"created_at":"2024-10-03T22:11:51.773Z","updated_at":"2025-05-12T20:47:23.796Z","avatar_url":"https://github.com/ajzbc.png","language":"TypeScript","readme":"# Cloudflare Worker Typesafe DB Example\n\nAn example Cloudflare Worker API with a typesafe database\n\n## Stack\n\n-   [Cloudflare Workers](https://developers.cloudflare.com/workers/) (serverless)\n-   [Hono](https://honojs.dev/) (router)\n-   [Kysely](https://koskimas.github.io/kysely/) (typesafe orm)\n-   [D1](https://developers.cloudflare.com/d1/) (database)\n\n## Setup\n\nCreate your database with [Wrangler](https://developers.cloudflare.com/d1/get-started/#3-create-your-database) or through the [Dashboard](https://dash.cloudflare.com)\n\nSet your new `database_name` and `database_id` in `wrangler.toml` [(reference)](https://developers.cloudflare.com/d1/get-started/#4-bind-your-worker-to-your-d1-database)\n\nRun the database migration\n\n```\nnpm run migrate\n```\n\nRun locally\n\n```\nnpm run dev\n```\n\n## Note\n\nProbably not the best setup, but just what works well for me :)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajzbc%2Fworkers-typesafe-db-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajzbc%2Fworkers-typesafe-db-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajzbc%2Fworkers-typesafe-db-example/lists"}