Skip to content

Engine Config

Since Didact Engine is a build once, deploy anywhere application, its behaviors are modified through a simple configuration file. This configuration file can be thought of as a set of runtime environment variables for Didact Engine.

engineconfig.json

To provide important environment variables and app settings for Didact Engine, you need an engineconfig.json file. This is similar to an appsettings.json file that you would find in a standard dotnet project.

engineconfig.json template

A engineconfig.json JSON template file is shown below:

json
{
    "Database": {
        "Provider": "<DB_PROVIDER_KEY>",
        "ConnectionString": "<DB_CONNECTION_STRING>"
    },
    "EngineApiKey": "<ENGINE_API_KEY>",
    "LicenseKey": "<LICENSE_KEY>"
}

engineconfig.json key matrix

The config keys are shown below in a matrix.

INFO

For simplicity, when referencing these keys through Didact CLI commands, use the exact JSON key reference here such as Database.Provider. It makes the CLI commands slightly ugly, but it avoids unproductive aliasing work on my part for the moment.

JSON and CLI key nameKey value typeKey value description
Database.ProviderstringThe database provider key for your database provider of choice.
Database.ConnectionStringstringThe connection string for the database.
EngineApiKeystringThe user-defined API key to protect Didact Engine with authentication.
LicenseKeystringAn API key from Didact Console that unlocks enhanced features.

EngineApiKey

DANGER

Please be aware that if you omit this setting, then Didact Engine's API routes will be unprotected.

Proudly powered by VitePress