#ENV EXPERIMENTAL FEATS

5 messages · Page 1 of 1 (latest)

dense flax
#

I'm testing new env experimental feat and have some questions:

  • for "server" "secret" with default value, it dont take the default on the config file...and get undefined.
  • how it works with the cloudflare envs... its seens get a wird error too. (debuging to get some info BTW)
#

Just for future reference... looks like the secrets are set at built time at ssr cloudflare. And we can access the envs by the local runtme.

#

the point for "server" "secret" with default value, it dont take the default on the config file...and get undefined. are still happening when using get secret.
import { API_URL, API_TOKEN, getSecret } from "astro:env/server"
const NODE_ENV = getSecret("NODE_ENV")

#

BTW. GREAT FEATURE.

austere sparrow
#

There might be a bug tbh! Feel free to open an issue on the cloudflare repo and ping me (@florian-lefebvre)