Compare commits

...

1 Commits

Author SHA1 Message Date
rdmclin2 48aa0ad245 chore: update neon webSocketConstructor ws 2026-04-21 18:29:07 +08:00
+3 -4
View File
@@ -33,10 +33,9 @@ If you don't have it, please run \`openssl rand -base64 32\` to create one.
return nodeDrizzle(client, { schema });
}
if (process.env.MIGRATION_DB === '1') {
// https://github.com/neondatabase/serverless/blob/main/CONFIG.md#websocketconstructor-typeof-websocket--undefined
neonConfig.webSocketConstructor = ws;
}
// Node 22+ global WebSocket drops Neon pool connections on idle — force `ws`.
neonConfig.webSocketConstructor = ws;
neonConfig.poolQueryViaFetch = true;
const client = new NeonPool({ connectionString });
return neonDrizzle(client, { schema });