I’m very new to netlify and nextjs for that matter. I’m managing to get everything working and in general not having in real issues with build/deploy. I am building some api’s using nextjs (v11).
I am trying to figure out how I can determine what context the api is running in (dev, branch-deploy, production). I am currently on the free tier. I see in the docs there is a CONTEXT environment variable. This looks to be exactly what I’d like to get to but I can’ t figure out how.
I’ve tried to use process.env.CONTEXT in my nextjs api endpoint. I’ve been using console.logs in various points to try and see what the value is at various points. It always seems to be undefined. What am I missing?
Thanks in advance,