C# Basic Webserver
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.
terchrisPrerequisites
Files
Files (10)
├── .dockerignore ├── .gitignore ├── Dockerfile ├── README-csharp-basic-webserver.md ├── template-info.yaml ├── .github/ │ └── workflows/ │ └── urbalurba-build-and-push.yaml ├── manifests/ │ ├── deployment.yaml │ └── kustomization.yaml └── src/ └── WebApplication/ ├── Program.cs └── WebApplication.csproj
Related templates
①What gets set up
When you install this template, the following are configured for you:
- Installs .NET SDK, ASP.NET Core Runtime, and VS Code extensions for C# development
②Run the ASP.NET Core app
dotnet watch runASP.NET Core runs on port 3000 with hot reload via dotnet watch. VS Code auto-forwards the port.
Architecture
These diagrams are auto-generated from the template's metadata. Click any diagram to enlarge.
Deployment
Components
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
| Path | Method | Response |
|---|---|---|
/ | GET | Plain text: greeting, template id csharp-basic-webserver, time and date |
Entry point and port
- File:
src/WebApplication/Program.cs - Port:
ASPNETCORE_URLSif set; otherwise 3000 (seeUseUrlsin the file) - Dev with reload:
dotnet watch run --project src/WebApplication
Changing the app
- Add minimal APIs with
app.MapGet,app.MapPost, etc., on theWebApplicationinstance beforeapp.Run().