Truffle test – network error

truffle(ganache)> truffle testError: You must specify a network_id in your ‘ganache’ configuration in order to use this network. Go to config file: truffle-config.js -> uncomment ‘development’ section in ‘networks’. Change port if you have a different one in Ganache, e.g. modfiy from 8545 to 7545. Save file -> back to console -> run command: ‘truffleContinue reading “Truffle test – network error”

Get data from appsettings.json file

I will show how to get your data from appsettings.json and e.g. show it on view. First, go to an appsettings.json and add the entry. In my case, I added:“Message”: “Message from appsettings.json” All appsettings.json code looks like this: Second step, changes to the controller, let’s take a sample HomeController. So inject IConfiguration in HomeControllerContinue reading “Get data from appsettings.json file”