We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b2c39b commit b34c9a6Copy full SHA for b34c9a6
src/content/docs/hyperdrive/index.mdx
@@ -103,11 +103,11 @@ import { createConnection } from 'mysql2/promise';
103
export default {
104
async fetch(request, env, ctx): Promise<Response> {
105
const connection = await createConnection({
106
- host: env.DB_HOST,
107
- user: env.DB_USER,
108
- password: env.DB_PASSWORD,
109
- database: env.DB_NAME,
110
- port: env.DB_PORT
+ host: env.HYPERDRIVE.host,
+ user: env.HYPERDRIVE.user,
+ password: env.HYPERDRIVE.password,
+ database: env.HYPERDRIVE.database,
+ port: env.HYPERDRIVE.port,
111
112
// This is needed to use mysql2 with Workers
113
// This configures mysql2 to use static parsing instead of eval() parsing (not available on Workers)
0 commit comments