Skip to content

Hyperdrive MySQL "Write a Worker" example missing HYPERDRIVE reference #21920

@kevin-golo

Description

@kevin-golo

Existing documentation URL(s)

What changes are you suggesting?

The MySQL example of the Hyperdrive > Getting Started > Write a Worker page does not reference the HYPERDRIVE environment variable. Where the connection is created:

const connection = await createConnection({
  host: env.DB_HOST,
  user: env.DB_USER,
  password: env.DB_PASSWORD,
  database: env.DB_NAME,
  port: env.DB_PORT

It should be referencing the environment variable HYPERDRIVE for these parameters:

const connection = await createConnection({
    host: env.HYPERDRIVE.host,
    user: env.HYPERDRIVE.user,
    password: env.HYPERDRIVE.password,
    database: env.HYPERDRIVE.database,
    port: env.HYPERDRIVE.port,

Additional information

Image

Metadata

Metadata

Labels

content:editRequest for content editsdocumentationDocumentation editsproduct:hyperdriveHyperdrive: https://developers.cloudflare.com/hyperdrive/

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions