Anyone managed to hyperdrive working with remote database + kysely + local development Using `pg@8.

Anyone managed to hyperdrive working with remote database + kysely + local development

Using pg@8.11.0, initiating kysely like this:

const connectionString =
      env.LOCAL_DATABASE_URL || env.HYPERDRIVE.connectionString;
new Kysely<DB>({
    dialect: new PostgresDialect({
      pool: new Pool({
        max: 1,
        connectionString,
        ssl: {
          rejectUnauthorized: false,
        },
      }),
    }),
  });


Using LOCAL_DATABASE_URL for local development (connectionstring including ?sslmode=require), I'm able to setup the connection, but any query will yield Error: Connection terminated unexpectedly.

Been trying to use localConnectionString instead of bypassing hyperdrive in local dev, but it transforms my connectionstring to some hyperdrive.local url.
Was this page helpful?