The docs mention that a server endpoint can use environment variables, but doesn't say how. I found that I was able to get variables from import.meta.env when using yarn dev, but when I deployed to Netlify, the variables weren't found. When I switched to process.env, it worked on Netlify, but not in yarn dev.
Is there a way to use the same code in both environments?