Skip to content

shim cloudflare:env #58

Open
Open

Description

@pi0

https://developers.cloudflare.com/workers/runtime-apis/bindings/#how-to-access-env

we might make a virtual module that accesses globally injected __env__ for now.

Activity

  1. Gonzalo-Bruna commented on Jun 13, 2025

    @Gonzalo-Bruna

    Is there currently a way to access Cloudflare environment variables?
    I tried moving my NeonDB database to Cloudflare Hyperdrive, but I’m not sure how to get the connection string because I don’t know how to access the environment variables. I ran into a similar issue with Cloudflare KV and ended up using Nitro’s unstorage implementation so I didn’t have to worry about environment variables. Is this possible at the moment?

  2. pi0 commented on Jun 13, 2025

    @pi0
    MemberAuthor

    @Gonzalo-Bruna Using nitro, you can access to process.env in production also in dev if you set them with script or .env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions