MXMSConfiguration: Difference between revisions
From MXMS Wiki
Jump to navigationJump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
<pre> | |||
public void ConfigureServices(IServiceCollection services) | |||
{ | |||
var mxms = services.AddMXMS(_env, _config) | |||
.WithDefaultConfigurationAndApplication() | |||
.WithEntityStoreConfiguration(i => | |||
{ | |||
i.AutoUpdateDatastore = true; | |||
}) | |||
.WithEnvironmentConfiguration(i => | |||
{ | |||
i.Culture = new System.Globalization.CultureInfo("nl-NL"); | |||
}) | |||
.WithSecurityConfiguration(i => | |||
i.Enable2Factor = false | |||
) | |||
.WithEncryptor("glc3aYtZ6arCb7T2sa5gVA=="); | |||
if (_env.IsDevelopment()) | |||
{ | |||
mxms.EnableDebug(); | |||
} | |||
mxms.Build(); | |||
} | |||
</pre> | |||
== Environment configuration == | == Environment configuration == | ||
<pre> | <pre> | ||
Revision as of 06:49, 31 March 2026
public void ConfigureServices(IServiceCollection services)
{
var mxms = services.AddMXMS(_env, _config)
.WithDefaultConfigurationAndApplication()
.WithEntityStoreConfiguration(i =>
{
i.AutoUpdateDatastore = true;
})
.WithEnvironmentConfiguration(i =>
{
i.Culture = new System.Globalization.CultureInfo("nl-NL");
})
.WithSecurityConfiguration(i =>
i.Enable2Factor = false
)
.WithEncryptor("glc3aYtZ6arCb7T2sa5gVA==");
if (_env.IsDevelopment())
{
mxms.EnableDebug();
}
mxms.Build();
}
Environment configuration
.WithEnvironmentConfiguration(i =>
{
// Configuration changes here
})
Workingdirectory
Logging configuration
.WithLoggingConfiguration(i =>
{
// Configuration changes here
})
Entity store configuration
.WithEntityStoreConfiguration(i =>
{
// Configuration changes here
})
Security configuration
.WithSecurityConfiguration(i =>
{
// Configuration changes here
})
API configuration
.WithAPIConfiguration(i =>
{
// Configuration changes here
})