Something went wrong. Try again.
Schedule posts and reposts to Bluesky (and other PDSes) with Cloudflare workers. skyscheduler.work
scheduling social-media cloudflare bsky service cloudflare-workers bsky-tool bluesky
Something went wrong. Try again.
459 B · 10 lines
TypeScript
at main
1234567891011import { drizzle } from "drizzle-orm/d1";import { ExtendedD1Database } from "../../classes/db";import { USE_NEW_DB_WRAPPER } from "../../config";import { schema } from "../../db/schema";
export function getDrizzle(DB: D1Database) { // This is currently separated in a helper function // so that if we get D1 read replicas, we can easily invoke them. return drizzle(USE_NEW_DB_WRAPPER ? new ExtendedD1Database(DB) : DB, { schema, logger: false });}