environment variables aren't working correctly on staging (vercel+next.js)

hello I still receive production value on staging environment even tough I've setup ( Vercel / Next.js )
1 Reply
Mert Efe
Mert Efe2y ago
can someone tell me what i'm doing it wrong ?
export const API_URL =
process.env.NODE_ENV === "production"
? "https://xxx/api"
: process.env.NODE_ENV === "staging"
? "https://yyyy/api"
: "http://localhost:5000/api";
export const API_URL =
process.env.NODE_ENV === "production"
? "https://xxx/api"
: process.env.NODE_ENV === "staging"
? "https://yyyy/api"
: "http://localhost:5000/api";
Want results from more Discord servers?
Add your server