Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
A real service uses a framework, not the raw socket. Every language has its workhorse: Go's net/http, Python's FastAPI, Rust's Axum or Actix, Node's Express or Fastify. They all do the same thing — route HTTP requests to your handlers — but they make different tradeoffs on performance, ergonomics, and memory. Learning the minimum-viable server in each is a 15-minute exercise per language, and it calibrates your sense of what 'fast' and 'simple' mean in each ecosystem.
Every production service registers at least two routes: a root and a health check. Building both in Go's net/http, Python's FastAPI, Rust's Axum, and Node's Express simultaneously reveals how each ecosystem handles routing, response types, and JSON serialisation — and which language makes the simplest things simplest. The structural differences are small; the ergonomic differences matter after you've written the same route fifty times.
/ and /health server running. Curl both.curl -w 'time=%{time_total}\n' -o /dev/null -s http://localhost:8080/ and note the response time for each language. Surprising?package main
import (
"encoding/json"
"net/http"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello from go\n"))
})
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{"status": "ok"})
})
http.ListenAndServe(":8080", mux)
}go run main.go