getConfig(Defined in: packages/modelence/src/config/server.ts:43key):undefined|string|number|boolean
Parameters
Returns
undefined | string | number | boolean
The configuration value (string, number, or boolean)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
getConfig(Defined in: packages/modelence/src/config/server.ts:43key):undefined|string|number|boolean
| Parameter | Type | Description |
|---|---|---|
key | string | The configuration key to retrieve |
undefined | string | number | boolean
The configuration value (string, number, or boolean)
import { getConfig } from 'modelence/server';
// Get the site URL
const siteUrl = getConfig('_system.site.url');
MODELENCE_SITE_URL=https://myapp.com
import { getConfig } from 'modelence/server';
// Get the current environment (e.g., 'development', 'staging', 'production')
const env = getConfig('_system.env');
if (env === 'production') {
// Enable production features
}
MODELENCE_SITE_ENV=production