Using environment variables in Next.js Frontend
October 30, 2023 — Recently, in one of my Next.js projects LinkSnatch, I needed to use API keys from jsonlink.io. Now, I didn’t want to hardcode the API key in the codebase since it’s an open-source project. So, the best way to handle this is to use environment variables.