import { neon, Pool, neonConfig } from '@neondatabase/serverless';
import ws from 'ws';
neonConfig.webSocketConstructor = ws;
if (!process.env.VERCEL_ENV) {
neonConfig.wsProxy = (host) => `${host}:5433/v1`;
neonConfig.useSecureWebSocket = false;
neonConfig.pipelineTLS = false;
neonConfig.pipelineConnect = false;
neonConfig.forceDisablePgSSL = true;
}
// const pool = new Pool({ connectionString: "postgres://postgres:postgres@0.0.0.0:5433/postgres" });
const sql = neon("postgres://postgres:postgres@0.0.0.0:5433/postgres");
async function main() {
const result = await sql`SELECT 1 + 1 AS solution`;
// const result = await pool.query(`SELECT 1 + 1 AS solution`);
console.log(result);
process.exit(0)
}
main()
import { neon, Pool, neonConfig } from '@neondatabase/serverless';
import ws from 'ws';
neonConfig.webSocketConstructor = ws;
if (!process.env.VERCEL_ENV) {
neonConfig.wsProxy = (host) => `${host}:5433/v1`;
neonConfig.useSecureWebSocket = false;
neonConfig.pipelineTLS = false;
neonConfig.pipelineConnect = false;
neonConfig.forceDisablePgSSL = true;
}
// const pool = new Pool({ connectionString: "postgres://postgres:postgres@0.0.0.0:5433/postgres" });
const sql = neon("postgres://postgres:postgres@0.0.0.0:5433/postgres");
async function main() {
const result = await sql`SELECT 1 + 1 AS solution`;
// const result = await pool.query(`SELECT 1 + 1 AS solution`);
console.log(result);
process.exit(0)
}
main()