👩💻 Join our community of thousands of amazing developers!
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. Environment variables in Next.js Using environment variables in Cloudflare Pages Environment variables in Next.js To use environment variables in Next.js, you can create a .env.local file in the root of the project and add environment variables...