Start free. Scale as your blog grows.Get started

Developer documentation

Environment Setup

For most applications, you only need two environment variables.

The variables

Environment
CMS_API_KEY=your_api_key_here
CMS_API_URL=https://cms-api.contioreach.com

Local development

Place them in your local environment file. For Next.js:

File
.env.local

Example:

.env.local
CMS_API_KEY=your_api_key_here
CMS_API_URL=https://cms-api.contioreach.com

Restart your development server after changing environment variables.

Production

Add the same variables to your hosting environment. Examples include:

  • Vercel Environment Variables
  • Netlify Environment Variables
  • Cloudflare secrets
  • Container environment variables
  • Your cloud provider's secret management system

Your production API key should not be committed to your repository.

Create a reusable configuration

You can keep your ContioReach configuration in one place:

lib/contioreach.js
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.