Connecting to Vercel Postgres

I'm trying to connect to Vercel Postgres like this:
import { drizzle } from "drizzle-orm/vercel-postgres";
import { sql } from "@vercel/postgres";

export const db = drizzle(sql, { logger: true });

But I'm getting this error:
n [VercelPostgresError]: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
It seems like there's no credentials passing here and this sql thing should read the connection string from
.env
file which you need to pull from Vercel?
Am I doing something wrong or is the Vercel + Drizzle ORM mix not supported in dev environment yet?
Was this page helpful?