A complete loopback server
Tying together the previous two lessons: a complete echo server that wraps every message in a small envelope (timestamp, server name, type) and serves a tiny HTML test page on / from the same FastAPI app. Useful as a sanity-check sandbox while you build out application logic.
Why the HTML page
Browsers will refuse ws:// from https:// pages, and many corporate proxies block raw ws:// entirely. Serving the test client from the same origin sidesteps both. cwkPippa does the same trick — the React UI and the FastAPI backend live on adjacent ports during development, and the production deploy puts them on a single origin.