WrenAI
WrenAI copied to clipboard
we can’t connect to PostgreSQL database with ssl
Describe the bug
we can’t connect to PostgreSQL database with ssl. and it seems that we haven't handle this condition. related code location:
wren-ui/src/apollo/server/connectors/postgresConnector.ts
at 207th line
To Reproduce
please contact Jimmy to get the password
import pg from 'pg';
const { Client } = pg;
const client = new Client({
user: 'test_owner',
host: 'ep-blue-leaf-a1xwqzaf.ap-southeast-1.aws.neon.tech',
database: 'pagila',
password: 'xxxxx',
port: 5432,
// ssl: true, // comment out this, and we can connect to the db
});
await client.connect();
console.log(await client.query('SELECT NOW()'));
await client.end();
Expected behavior We should enable users to connect to PostgresSQL database with ssl. It can also help us do demos using Neon!
Desktop (please complete the following information):
- OS: MacOS
- Browser: Brave
WrenAI Information
- Version: 0.2.1
Additional context