Skip to main content
What you’ll learn:
  • The difference between development and production instances
  • How to work across environments
  • Best practices for environment management
References:

Understanding Instances

An instance represents an isolated environment within your project. Each instance has its own:
  • Server deployments
  • API keys
  • OAuth sessions
  • Logs and metrics
Changes in one instance don’t affect others, allowing you to test in isolation.

Instance Types

Development Instance

Your default workspace for building and testing.

Production Instance

Your live environment for real users and applications.

Working Across Environments

Switching Instances

In the Metorial dashboard, use the instance dropdown in the navigation to switch between environments.

Separate API Keys

Use different API keys for each instance:
// Development
let devMetorial = new Metorial({
    apiKey: process.env.METORIAL_DEV_KEY
});

// Production
let prodMetorial = new Metorial({
    apiKey: process.env.METORIAL_PROD_KEY
});

Best Practices

Never share credentials: Use separate API keys and OAuth apps for each environment. Test before production: Always test deployments in development before using in production. Access control: Limit production access to necessary team members.

What’s Next?