Blash has a number of settings that can be changed to suit your needs.
This is what you can change in the appsettings.json
file.
Blash API
Blash's bulk of the work occurs in the Blash API, so this is where most of the settings can be configured.
Inside the source code , you can navigate to Web/RoundTheCode.Blash/Api/appsettings.json
to make changes to the settings in the Blash API.
Here are the settings available, and a definition on what they can do.
Writing Logs
Blash has been set up so log outputs are written to the console.
In-addition, Blash extends the logging feature that comes with ASP.NET Core to allow for writing log files to text files.
You can configure the log files location by specifying the folder path and the file path.
Name Definition appsettings.json Location Default Value Folder Path The folder as to where log files are written to. File > Options > FolderPath
logs
File Path The name of the file where the log files are written to. You can use the placeholder {date}
to create a new log file every day. File > Options > FilePath
log_{date}.log
Connection Strings
Blash uses Entity Framework to connect to a SQL Server database.
You will need to provide connection details to your SQL Server so Blash is able to communicate with it.
Name Definition appsettings.json Location Default Value Blash Connection String The connection string that Entity Framework uses to commuicate with the SQL Server database. ConnectionStrings > BlashDbContext
Server=localhost; Database=RoundTheCode_Blash; Trusted_Connection=true; MultipleActiveResultSets=true; Integrated Security=true;
Twitter API
Blash requires communication with the Twitter API. In-order to do that, you need to set up a Twitter developer account and set up an app.
The app will then provide you with a client ID and secret which you will need to input.
Name Definition appsettings.json Location Default Value Client ID The client ID of the Twitter app. Api > TwitterApi > ClientId
{clientid}
Client Secret The client secret of the Twitter app. Api > TwitterApi > ClientSecret
{clientsecret}
Tweets
Blash has a number of settings regarding the tweets retrieved from the Twitter API.
Name Definition appsettings.json Location Default Value Sync Recent Schedule How often to resync the dashboard and their tweets with the Twitter API. Format of value is a timespan in h:mm:ss
. Api > Tweets > SyncRecentSchedule
1:00:00
Max Per Dashboard The maximum number of tweets to appear for each dashboard. Api > Tweets > MaxPerDashboard
10
Client Hosts
Blash's Blazor WebAssembly application requires Cross-Origin Resource Sharing (CORS) to access the Blash API.
Blash's settings allows you to add multiple clients to be set up for CORS.
This is handy if you want to change the host of the Blazor WebAssembly application.
Name Definition appsettings.json Location Default Value Client Hosts A list of client hosts that are allowed CORS against the Blash API. Api > ClientHosts
https://localhost:5002
Blazor WebAssembly
The Blazor WebAssembly application has minimal settings compared to the Blash API.
However, if you wish to change the host of the Blash API, you can change it's host when configuring the Blazor WebAssembly application.
Inside the source code , you can navigate to Web/RoundTheCode.Blash.BlazorWasm/wwwroot/appsettings.json
to make changes to the settings in the Blazor WebAssembly application.