You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using [Neon](https://neon.tech)'s PostgreSQL like [Vercel Postgres](https://vercel.com/docs/postgres), you can use `@neondatabase/serverless` to work with edge runtime.
55
+
56
+
```ts filename="./auth.ts"
57
+
importNextAuthfrom"next-auth"
58
+
importPostgresAdapterfrom"@auth/pg-adapter"
59
+
import { Pool } from"@neondatabase/serverless"
60
+
61
+
// *DO NOT* create a `Pool` here, outside the request handler.
62
+
// Neon's Postgres cannot keep a pool alive between requests.
If you are using [Neon](https://neon.tech)'s PostgreSQL like [Vercel Postgres](https://vercel.com/docs/postgres), you can use `@neondatabase/serverless` to work with edge runtime.
99
+
100
+
```ts filename="./src/auth.ts"
101
+
import { SvelteKitAuth } from"@auth/sveltekit"
102
+
importPostgresAdapterfrom"@auth/pg-adapter"
103
+
import { Pool } from"@neondatabase/serverless"
104
+
105
+
// *DO NOT* create a `Pool` here, outside the request handler.
106
+
// Neon's Postgres cannot keep a pool alive between requests.
0 commit comments