This is a .NET 7.0 console application built with Spectre.Console that demonstrates simple API communication via endpoints from JSONPlaceholder.
- .NET 7.0 - .NET 7.0 SDK.
- Spectre.Console - robust library that helps create beautiful console applications.
- xUnit.net - unit testing for the console application project.
- Microsoft.Extensions.Hosting - manages hosting and startup infrastructure for the application.
- Microsoft.Extensions.Configuration - binds configuration from
appsettings.json
to concrete types. - Microsoft.Extensions.Http - enables the HttpClient factory pattern for configuring/retrieving named HttpClients in a composable way.
- Install the .NET 7.0 SDK.
- Clone this repository to your local machine.
dotnet
commands can be issued via Windows Terminal, Powershell, Command Prompt, etc. (the GIF above is using Windows Terminal). Alternatively, you can open the solution in VS or VSCode and execute commands there.
- Build the projects: run
dotnet build
in theroot
folder.Directory containing the
GhostConsole.sln
file. - Run the console app: run
dotnet run
in the./GhostConsole
folder.Directory containing the
GhostConsole.csproj
file. - Run the unit tests: run
dotnet test
in the./GhostConsole.Tests
folder.Directory containing the
GhostConsole.Tests.csproj
file.