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 |
---|---|---|---|
|
| Live environment for real users & data | API Token / OAuth |
|
| Testing pre-release features safely | API Token |
|
| 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:
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
By default, your API will run at:
🧱 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
dotenv
,direnv
, or.envrc
to switch configs quickly