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
import { Pool, neonConfig } from '@neondatabase/serverless';
...
const pool = new Pool({ connectionString: 'postgresql://postgres:password@localhost:54320/postgres' });
const result = await pool.query('SELECT id, name FROM sauna_location LIMIT 1');
Expected result
Returns rows from the database
Actual result
Throws ErrorEvent
Environment
Running in locally in MacOS, M2 ghcr.io/neondatabase/wsproxy:latest in Docker
"@neondatabase/serverless": "^0.10.4",
next.js 14.2.19
Vercel Edge runtime, servlerless function
I would like to use Neon with HTTP only. But cannot find any option to disable websockets. Also, would like to use it without a pool with multiple queries, but again only the one shot query function.
WebSockets shouldn't need to be disabled: simply don't use the Pool or Client objects and WebSockets will not be used.
IIUC the wsproxy Docker image can forward WebSocket traffic but does not offer an http API, so http queries (via import { neon }) are not available in a local development environment.
Steps to reproduce
Expected result
Returns rows from the database
Actual result
Throws ErrorEvent
Environment
Running in locally in MacOS, M2
ghcr.io/neondatabase/wsproxy:latest
in Docker"@neondatabase/serverless": "^0.10.4",
next.js 14.2.19
Vercel Edge runtime, servlerless function
Logs, links
The text was updated successfully, but these errors were encountered: