Skip to content

Instantly share code, notes, and snippets.

This is a sample app, trying to demonstrate the smallest ASP.NET Core Minimal API, a "Hello World!" example. The Program.cs* is only three lines of code.

Program.cs:

var app = WebApplication.CreateBuilder(args).Build();
app.MapGet("/", () => "Hello World!");
app.Run();
@willurd
willurd / web-servers.md
Last active July 12, 2024 11:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000