What is the proper way to connect neon with drizzle orm in next js?
I'm working on an next js application deployed to vercel with drizzle orm - neon postgres Following the drizzle orm docs I've setup my db as below
import { neon } from "@neondatabase/serverless"import { config } from "dotenv"import { drizzle } from "drizzle-orm/neon-http"config({ path: ".env.local" })const sql = neon(process.env.DATABASE_URL as string)export const db = drizzle({ client: sql })
import { neon } from "@neondatabase/serverless"import { config } from "dotenv"import { drizzle } from "drizzle-orm/neon-http"config({ path: ".env.local" })const sql = neon(process.env.DATABASE_URL as string)export const db = drizzle({ client: sql })
but i get the following warning during generating migrations: Warning '@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket
How to connect from Drizzle How to use the Neon serverless driver with Drizzle Drizzle with Neon Postgres (Drizzle Docs) Schema migration with Drizzle ORM Next.js Edge Functions with Drizzle Drizzle i...