Developer documentation
For most applications, you only need two environment variables.
CMS_API_KEY=your_api_key_here
CMS_API_URL=https://cms-api.contioreach.comPlace them in your local environment file. For Next.js:
.env.localExample:
CMS_API_KEY=your_api_key_here
CMS_API_URL=https://cms-api.contioreach.comRestart your development server after changing environment variables.
Add the same variables to your hosting environment. Examples include:
Your production API key should not be committed to your repository.
You can keep your ContioReach configuration in one place:
export const contioreach = {
apiUrl:
process.env.CMS_API_URL ||
"https://cms-api.contioreach.com",
apiKey: process.env.CMS_API_KEY
};Then reuse it across your server side content functions.