Mojave supports multiple environments to help you build, test, and deploy with confidence. Each environment has its own base URL and token scope.

We recommend using separate API tokens and databases for each environment to avoid accidental data leakage or billing errors.

Available Environments

Environment

Base URL

Description

Auth Method

Production

https://api.mojaveapp.com

Live environment for real users & data

API Token / OAuth

Staging

https://staging-api.mojaveapp.com

Testing pre-release features safely

API Token

Local

http://localhost:3000

Local development server

API Token

🔐 Never use production tokens in staging or local development. Tokens are scoped per environment.

Switching Between Environments

To switch between environments, simply change the base URL and use a token from the corresponding environment.

Example – GET /me in staging:

curl -X GET https://staging-api.mojaveapp.com/v1/me \
  -H "Authorization: Bearer YOUR_STAGING_TOKEN"

Local Environment

You can run Mojave locally using Docker or Node. This is ideal for developers who:

  • Want to contribute to Mojave

  • Need to build/test internal tooling

  • Are self-hosting Mojave for their team

Basic Docker Setup

git clone https://github.com/mojave/mojave
cd mojave
cp .env.example .env
docker-compose up --build

By default, your API will run at:

http://localhost:3000

🧱 You can customize ports, database URLs, and secret tokens in your .env file.

Environment-Specific Behavior

Feature

Production

Staging

Local

Data Persistence

Yes

Wiped weekly

Dev DB or SQLite

Email/Webhooks

Live

Logged only

Mocked

Rate Limits

Enforced

Enforced (softer)

Disabled (optional)

Audit Logs

Enabled

Partial

Disabled

Tips for Managing Environments

  • Use separate tokens and users per environment

  • Never copy production data into dev or staging without sanitizing it

  • Enable feature flags or beta toggles using staging for safe previews

  • Use tools like dotenvdirenv, or .envrc to switch configs quickly

Was this helpful?

Was this helpful?

Was this helpful?

Table of content

Table of content

Table of content

Environments

Environments