mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 09:37:28 +00:00
chore: update neon webSocketConstructor ws
This commit is contained in:
parent
a76092c124
commit
6d1a5eb904
1 changed files with 3 additions and 4 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Reference in a new issue