Meldiron
Meldiron
Explore posts from servers
NNuxt
Created by Meldiron on 2/21/2025 in #❓・help
Reading public env var in lib script
I have lib/index.js and my code is:
const client = new Client()
.setEndpoint(process.env.NUXT_PUBLIC_APPWRITE_ENDPOINT)
.setProject(process.env.NUXT_PUBLIC_APPWRITE_PROJECT_ID);
const client = new Client()
.setEndpoint(process.env.NUXT_PUBLIC_APPWRITE_ENDPOINT)
.setProject(process.env.NUXT_PUBLIC_APPWRITE_PROJECT_ID);
if I try to console.log those values (endpoint and project), I get correct values in CLI (server-side rendering), but in browser's console both are undefined. How do I read public env vars properly?
13 replies
NNuxt
Created by Meldiron on 12/17/2024 in #❓・help
Node SSR exception logs
No description
13 replies