question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Qwik City - Add env to Qwik request context for Cloudflare Pages

See original GitHub issue

Is your feature request related to a problem?

I was trying to use the Cloudflare environment variables but I realised that I don’t have access to them with Qwik City.

Describe the solution you’d like

I would like environment variables env to be included in the request context for server endpoints. (onGet, onPost, onPut, onPatch, and onDelete)

Describe alternatives you’ve considered

I could hardcode my secrets, but I don’t think that’s the way.

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
mrmcc3commented, Aug 15, 2022

Some extra info. Cloudflare pages functions (and workers) provide bindings which show up on the env parameter (not global). This isn’t just for environment variables but also api access to KV namespaces, durable objects, R2 buckets and soon D1 databases. Definitely useful APIs for on___ functions

1reaction
nnelgxorzcommented, Aug 16, 2022

Oh and no need to apologies for being new to Qwik. Qwik is so new we’re all pretty new to it. 😆

Read more comments on GitHub >

github_iconTop Results From Across the Web

Qwik City - Cloudflare Pages Adaptor and Middleware
Qwik City Cloudflare Pages adaptor allows you to connect Qwik City to Cloudflare Pages. ... To integrate the cloudflare-pages adaptor, use the add...
Read more >
Deploy a Qwik site · Cloudflare Pages docs
In this guide, you will create a new Qwik application and deploy it using Cloudflare Pages. ​​ Creating a new project. Create a...
Read more >
Tag Archives: Cloudflare Pages - Noise
The components are highly reusable across multiple pages in different contexts with different data. We have a multidisciplinary team; everyone can send a...
Read more >
George Kalpakas (@gkalpakas) / Twitter
Mad props to @youyuxi and @RyanCarniato for making benchmarks on @QwikDev and ... That's why on Cloudflare Pages you can get unlimited requests,...
Read more >
Introducing Qwik — The JavaScript Framework With O(1 ...
It offers the fastest possible page load time regardless of the complexity of a website. Its load time is O(1). Install and Run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found