TanStackT
TanStack2mo ago
2 replies
urgent-maroon

How do I connect to Hyperdrive using Tanstack Start?

Hi, I have the following but I can't access my Hyperdrive binding from src/db/index.ts.

import { drizzle } from 'drizzle-orm/node-postgres' import { Client } from 'pg' import * as schema from './schema.ts' const client = new Client({ connectionString: process.env.HYPERDRIVE.connectionString, }) export const db = drizzle(client, { schema })
Was this page helpful?