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.jsonto 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.
dotnetcommands 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 buildin therootfolder.Directory containing the
GhostConsole.slnfile. - Run the console app: run
dotnet runin the./GhostConsolefolder.Directory containing the
GhostConsole.csprojfile. - Run the unit tests: run
dotnet testin the./GhostConsole.Testsfolder.Directory containing the
GhostConsole.Tests.csprojfile.
