export WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE="postgres://REMOVED:REMOVED@1.2.3.4:5432/eh?sslmode=require"wrangler dev --remote which will still want a localConnectionString but will use the actual Hyperdrive binding you give it and otherwise work like a normal worker.gitignore an .env file, or it appears in your clipboard history, etc.--auto-iam-authn to workcloud-sql-proxy, I can remove 0.0.0.0/0 in the allow IPs list in Google Cloud SQL.null and the pooler connection times out without ever connecting. Anyone know what might be going wrong?pnpm run devwrangler.tomlnpx wrangler hyperdrive create linkp-neon-hyperdrive --connection-string="🚧 Creating 'linkp-neon-hyperdrive'
✅ Created new Hyperdrive config
{
"id": "<ID>",
"name": "linkp-neon-hyperdrive",
"origin": {
"host": "ep-old-sky--pooler.ap-southeast-1.aws.neon.tech",
"port": 5432,
"database": "linkp-db",
"scheme": "postgresql",
"user": "hyperdrive-user"
},
"caching": {
"disabled": false
}
}src/index.tsexport const injectDB = createMiddleware(async (c, next) => {
try {
console.log(
Connecting to database...${c.env.HYPERDRIVE.connectionString}
);
const sql = neon(c.env.HYPERDRIVE.connectionString);
c.req.db = drizzle({ client: sql, schema });
await next();
} catch (error) {
console.error("Database connection error:", error);
throw new HTTPException(503, { message: "Database connection failed" });
}
});import { drizzle } from "drizzle-orm/neon-http";Postgres & node-postgres instead of neon-http
env.HYPERDRIVE.connectionString in the global context?cloud-sql-proxy --port 59435 --address 127.0.0.1 'MY_CLOUD_ID:us-east4:INSTANCE_NAME'🚧 Creating 'linkp-neon-hyperdrive'
✅ Created new Hyperdrive config
{
"id": "<ID>",
"name": "linkp-neon-hyperdrive",
"origin": {
"host": "ep-old-sky--pooler.ap-southeast-1.aws.neon.tech",
"port": 5432,
"database": "linkp-db",
"scheme": "postgresql",
"user": "hyperdrive-user"
},
"caching": {
"disabled": false
}
}export const injectDB = createMiddleware(async (c, next) => {
try {
console.log(
);
const sql = neon(c.env.HYPERDRIVE.connectionString);
c.req.db = drizzle({ client: sql, schema });
await next();
} catch (error) {
console.error("Database connection error:", error);
throw new HTTPException(503, { message: "Database connection failed" });
}
});