Next.js Discord

Discord Forum

Help with Vercel Postgres and Drizzle

Unanswered
Tramp ant posted this in #help-forum
Open in Discord
Tramp antOP
I'm trying to setup Vercel Postgres and Drizzle in my NextJs app. When I'm trying to query the sample data, it is throwing the error - "Error: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found."
Here is the piece of code I'm trying to run, value of db is being logged correctly -
import "db" from "~/server/db";

function getPosts() {
console.log("Value of db", db);
const posts = await db.query.posts.findMany();
}

I've checked docs, couldn't narrow down what am I doing wrong, any help is appreciated.

Please forgive the screenshot quality. Thanks!

0 Replies