1. Build a tiny router
hard50 XPImplement class App with decorator methods get(path) and post(path) that register handlers, and handle(method, path, body=None) -> (status, dict). Paths may contain {name} params passed to the handler as keyword strings. POST handlers receive body too. Unknown path → (404, {"error": "not found"}); known path, wrong method → (405, {"error": "method not allowed"}). A handler raising KeyError → (404, …); ValueError → (400, {"error": str(e)}). Handlers return (status, dict).
Ctrl/⌘ + Enter runs the tests · Esc then Tab leaves the editor