Settings

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.

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.

NameDefinitionappsettings.json LocationDefault Value
Folder PathThe folder as to where log files are written to.File > Options > FolderPathlogs
File PathThe 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 > FilePathlog_{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.

NameDefinitionappsettings.json LocationDefault Value
Blash Connection StringThe connection string that Entity Framework uses to commuicate with the SQL Server database.ConnectionStrings > BlashDbContextServer=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.

NameDefinitionappsettings.json LocationDefault Value
Client IDThe client ID of the Twitter app.Api > TwitterApi > ClientId{clientid}
Client SecretThe 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.

NameDefinitionappsettings.json LocationDefault Value
Sync Recent ScheduleHow often to resync the dashboard and their tweets with the Twitter API. Format of value is a timespan in h:mm:ss.Api > Tweets > SyncRecentSchedule1:00:00
Max Per DashboardThe maximum number of tweets to appear for each dashboard.Api > Tweets > MaxPerDashboard10

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.

NameDefinitionappsettings.json LocationDefault Value
Client HostsA list of client hosts that are allowed CORS against the Blash API.Api > ClientHostshttps://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.

NameDefinitionappsettings.json LocationDefault Value
API HostThe host address of the Blash API.ApiHosthttps://localhost:5001