> For the complete documentation index, see [llms.txt](https://docs.elentra.org/ejs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elentra.org/ejs/1.1/guide/environments/configuration.md).

# Configuration

EJS environments are configured using a standard `environment.js` configuration file. This file must reside in the root directory of a given EJS environment.

### Directives <a href="#directives" id="directives"></a>

Each `environment.js` file must include the following directives:\
\- **name**: The name of the application in a format appropriate to display to users.\
\- **version**: The version of the application.\
\- **apiPath**: A path to prefix to API requests.\
\- **layoutNamespace**: A namespace for layout components, relative to the environment root.\
\- **moduleNamespace**: A namespace for modules, relative to the environment root.\
\- **pluginNamespace**: A namespace for plugins, relative to the environment root.\
\- **registeredModules**: An array of modules to be enabled. The module name must match its directory name in the moduleNamespace. ***NOT YET IMPLEMENTED:** The pathPrefix is prepended to all route paths defined by this module.*\
*-* **plugins**: An array of classnames of plugins to be installed, relative to the `pluginNamespace`.  The file extension is not required.\
\- **flags**: An object containing key-value pairs which provide additional configuration settings.

### Example <a href="#example" id="example"></a>

{% code title="environment.js" %}

```javascript
module.exports = {
    name: 'My Application',
    version: '1.0',
    apiPath: '/path/to/api',
    layoutNamespace: 'Layout',
    moduleNamespace: 'Module',
    pluginNamespace: 'Plugin',
    registeredModules: [
        {
            name: 'MyModule',
            pathPrefix: '/mymodule'
        },
        {
            name: 'Sandbox',
            pathPrefix: '/sandbox'
        }
    ],
    plugins: [
        'Vue/Directive/i18nDirective'
    ],
    flags: {
        'i18n-warnings': true
    }
};
```

{% endcode %}
