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'
}
2 Replies
setup an SSH tunnel
ssh -L 12345:localhost:5432 my.host.name
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