This code repo and video provide insights into environment variables in the Qwik lifecycle, how they are loaded from the .env
file, and log them as they flow through the application's lifecycle.
NOTE: This is not a comprehensive guide on environment variables, nor does it cover all the 3rd-Party hosting scenarios, but gives insights that can be applied to all environments. Hope it helps.
Video Explanation: https://youtu.be/NPf39RWc8LM
METHOD A:
git clone
this project to your local systemcd
into the project directorypnpm install
pnpm dev
(orpnpm preview
)
METHOD B: (Clean Qwik install and copy files):
pnpm create qwik@latest
cd
into the new project- Copy the sample
.env
,vite.config.ts
, and rootindex.tsx
pnpm dev
(orpnpm preview
)