startApp() function, environment variables, and Modelence Cloud settings.
Configuration Methods
There are three ways to configure your Modelence application, listed in order of precedence:- Environment Variables - Highest priority, overrides everything
- Modelence Cloud - Synced configuration from cloud.modelence.com
- startApp() Options - Direct code configuration, lowest priority
Basic Configuration with startApp()
ThestartApp() function is your application’s entry point where you configure core settings:
src/server/app.ts
Environment Variables
Environment variables provide a way to configure your application without hardcoding values. They override all other configuration methods.Core Environment Variables
.modelence.env
All Environment Variables
EveryMODELENCE_* variable (plus the few non-prefixed ones) that the framework or first-party packages read. Anything not listed here is application-specific and should go through defineConfigs / getConfig instead.
Core
Modelence Cloud
Authentication (OAuth providers)
Email providers
Modelence Cloud Configuration
When connected to Modelence Cloud, you can manage configuration through the cloud dashboard at cloud.modelence.com:- Navigate to your application
- Select your environment
- Open the Application tab
- Configure settings like:
- Email providers
- Environment variables
- Database connections
- Custom configuration
Connecting to Modelence Cloud
.modelence.env file with your cloud connection token.
Next Steps
Authentication
Configure authentication and user management
Email Setup
Set up email providers for transactional emails
Roles & Permissions
Define user roles and permissions
WebSockets
Enable real-time communication