How to override the config for a new blockchain app?

The configuration for a new blockchain application can be overwritten when passing the config to the application object as shown in the code snippet below.

const { Application, genesisBlockDevnet} = require('lisk-sdk'); 

const app = new Application(genesisBlockDevnet, {
    app: {
        label: 'my-label' 
    },
    components: {
        logger: {
            consoleLogLevel: "debug" 
        }
    }
});

The following config we passed will set the log level to debug and change the application name to my-label. More information about modifying default values can be found in the Lisk docs.

In a normal situation where you want to use the devnet config, you would do something like this:

const { Application, genesisBlockDevnet, configDevnet} = require('lisk-sdk'); 

const app = new Application(genesisBlockDevnet, configDevnet);