Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevin-golo opened this issue Apr 23, 2025 · 1 comment · Fixed by #22010
Closed

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

kevin-golo opened this issue Apr 23, 2025 · 1 comment · Fixed by #22010
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:hyperdrive Hyperdrive: https://developers.cloudflare.com/hyperdrive/

Comments

@kevin-golo
Copy link

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

@kevin-golo kevin-golo added content:edit Request for content edits documentation Documentation edits labels Apr 23, 2025
@github-actions github-actions bot added the product:hyperdrive Hyperdrive: https://developers.cloudflare.com/hyperdrive/ label Apr 23, 2025
@Oxyjun
Copy link
Contributor

Oxyjun commented Apr 28, 2025

Hey @kevin-golo, thanks for raising this issue! This has been actioned + merged :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:hyperdrive Hyperdrive: https://developers.cloudflare.com/hyperdrive/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants