> During the public beta, your account will need to be explicitly enabled by the Cloudflare team. th
During the public beta, your account will need to be explicitly enabled by the Cloudflare team.this still true? can I have it?




Postgres.js 3.4.0
import { Client } from 'pg';
import { Hono, MiddlewareHandler } from 'hono';
type Bindings = {
HYPERDRIVE: Hyperdrive;
};
const app = new Hono<{
Bindings: Bindings;
Variables: {
DB: Client;
};
}>();
const dbMiddleware: MiddlewareHandler = async (c, next) => {
c.set('DB', new Client({ connectionString: c.env.HYPERDRIVE.connectionString }));
await next();
};
app.get('/', dbMiddleware, async (c) => {
try {
// Connect to our database
await c.var.DB.connect();
// Test query
let result = await c.var.DB.query({ text: 'SELECT * FROM pg_tables' });
// Return result rows as JSON
return c.json(result);
} catch (e) {
console.log(e);
return Response.json({ error: JSON.stringify(e) }, { status: 500 });
}
});
export default app;