A small HTTP server, without a framework
Start with the standard library. Add a route, return JSON, and give every request a sensible time limit.
HTTP services, useful error messages, and tests that describe the behavior of your code.
Start with the standard library. Add a route, return JSON, and give every request a sensible time limit.
Return useful errors from the place where something failed, and handle them where a decision can be made.
Use httptest to verify the contract a caller sees: status, headers, and response data.