Configuration

To configure your application, there a many options to use for NLess.IO.

{
  "ConnectionStrings": {
    "Master": "[EMPTY]"
  },
  "Serilog": {
    "Using":  [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Warning",
        "System": "Warning"
      }
    },
    "WriteTo": [
      { "Name": "Console" },
      { "Name": "File",
        "Args": { 
          "path": "Logs/log-.txt",
          "rollingInterval": "Day",
          "outputTemplate": "{Timestamp:yyyy-MM-dd-hh-mm-ss-fff} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
        }
      }
    ]
  },
  "AllowedHosts": "*",
  "NLESS.IO": {
    "RunSetup": true,
    "Domain": "",
    "Use2FAAuth": false,
    "Smtp": {
      "From": "",
      "Host": "",
      "Port": 587,
      "Username": "",
      "Password": "",
      "SecureSocketOptions": "StartTls"
    },
    "Caching": {
      "MediaCacheFolder": "media"
    },
    "Serialization": {
      "Path": "serialization",
      "DeserializeOnStartUp": true,
      "SerializerEnabled": [
        "NodeSerializer",
        "UserSerializer",
        "ApiKeySerializer",
        "BlobSerializer",
        "GroupSerializer",
        "LanguageSerializer",
        "NodeTypeSerializer",
        "SettingsSerializer",
        "UserTypeSerializer"
      ]
    },
    "Indexing": {
      "Enabled": true,
      "Indexes": [
        {
          "Name": "Preview",
          "Path": "index/preview",
          "IsEnabled": true
        },
        {
          "Name": "Public",
          "Path": "index/public",
          "IsEnabled": true
        }
      ]
    },
    "Events": {
      "CleanUpInterval": "",
      "Enabled": true,
      "KeepDuration": 1440
    },
    "CreateVersionAutomatically": false,
    "TestMode": false,
    "Initialize": {
      "RebuildRelationTable": true,
      "CreateDefaultLanguage": {
        "Name": "English",
        "Culture": "en"
      }
    }
  }
}

Connectionstring

The connectionstring will normaly set during the setup process. 
Valid value eg.: Server=[SERVER-NAME];Database=[DATABASE NAME];User Id=[USER];Password=[PASSWORD];TrustServerCertificate=true;

 

NLess.IO:RunSetup

If its set to "true" it will run the setup process. In case the connectionstring is already set, it will ask to create an administrative user.

 

NLess.IO:Domain

Will be used in emails for handling user related action like the password reset link. 
⚠️ Start url with "http..."

 

NLess.IO:Use2FAAuth

Enables the Two-Factor-Authentication for the user login. When its enabled, the user will get an email with a one-time code to verify.

 

NLess.IO:Smtp

This setting is needed when using Two-Factor-Authentication

 

NLess.IO:Caching:MediaCacheFolder

The media cache folder is a folder on the file system to cache resized/cropped images.

 

NLess.IO:Serialization:Path

When serializers are added, this path is used to store the json formatted data like Node-Types and other datas.

 

NLess.IO:Serialization:SerializerEnabled

This array defines all enabled serializers. Eg. to disable content serialization, remove the NodeSerializer from the list.

 

NLess.IO:Serialization:DeserializeOnStartUp

If its enabled, it will deserialize all datas depending on the added serializers.

 

NLess.IO:Events

NLess.IO will add many events to the event table to list recent changes. 

 

NLess.IO:Events:Enabled

By default its enabled, you can turn off this features. 

 

NLess.IO:Indexing

NLess.IO can handle multiple Lucene index.

 

NLess.IO:Indexing:Enabled

By default its enabled, you can turn off this features. 

 

NLess.IO:Events:KeepDurations

This value defines how many minutes an listed event in the event table is existing, before it will be removed. 

 

NLess.IO:CreateVersionAutomatically

If its enabled, after saving a published version it will create automatically a new version.

 

NLess.IO:TestMode

If its enabled, you are able to fake logged-in users by adding the header "test-user" to the request. The value will be the email address of an user. Helpful for testing different users on using GraphQL API.

 

NLess.IO:Initialize:RebuildRelationTable

Every node, media and user can have a relation to other nodes, medias or users. To keep track of the relation, it can be helpful to recreate this table on startup. Can take some time to proceed.

 

NLess.IO:Initialize:CreateDefaultLanguage

By default, no language is added. This configuration will add the language, if its not existing.