I can't connect to the DB const db = await drizzle("node-postgres", process.env.DATABASE_URL!);

I just want to connect the DB through the above command. The expected problem is that the DB is not allowed public access, so I need SSH authentication, which is not provided by drizzle orm. Is there any way? error msg Error.captureStackTrace(err) ^ Error: getaddrinfo ENOTFOUND base at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: 'base' }
No description
2 Replies
DoggeSlapper
DoggeSlapper3mo ago
setup an SSH tunnel ssh -L 12345:localhost:5432 my.host.name
DoggeSlapper
DoggeSlapper3mo ago
Or use https://github.com/mscdex/ssh2 to stablish the tunnel then connect
GitHub
GitHub - mscdex/ssh2: SSH2 client and server modules written in pur...
SSH2 client and server modules written in pure JavaScript for node.js - mscdex/ssh2
Want results from more Discord servers?
Add your server