Skip to main content

C# Basic Webserver

C# Basic Webserver logo
C# Basic Webserverv1.0.0

ASP.NET Core server with health endpoint and Docker support

A minimal ASP.NET Core web server with hot reload via dotnet watch. Includes Docker multi-stage build, Kubernetes deployment manifests, and GitHub Actions CI/CD workflow.

Tools: dev-csharp
Install:dev-template csharp-basic-webserver
Maintainers: terchristerchris
GETTING STARTED

Prerequisites

Files

ENVIRONMENT

What gets set up

When you install this template, the following are configured for you:

In your devcontainer

Run the ASP.NET Core app

dotnet watch run

ASP.NET Core runs on port 3000 with hot reload via dotnet watch. VS Code auto-forwards the port.

ARCHITECTURE

Architecture

These diagrams are auto-generated from the template's metadata. Click any diagram to enlarge.

Deployment

Template README

The C# Basic Webserver template is a simple hello world app built with ASP.NET Core minimal APIs that displays "Hello world" on a web page. The purpose of this simple app is to verify that the development environment is set up and ready. See more documentation at http://localhost:3000/docs/templates/basic-web-server/csharp-basic-webserver

HTTP API

PathMethodResponse
/GETPlain text: greeting, template id csharp-basic-webserver, time and date

Entry point and port

  • File: src/WebApplication/Program.cs
  • Port: ASPNETCORE_URLS if set; otherwise 3000 (see UseUrls in the file)
  • Dev with reload: dotnet watch run --project src/WebApplication

Changing the app

  • Add minimal APIs with app.MapGet, app.MapPost, etc., on the WebApplication instance before app.Run().