A complete REST API server demonstrating:
duso http-server.du
Then in another terminal:
# Home page
curl http://localhost:8080/
# JSON greeting
curl "http://localhost:8080/api/hello?name=Alice"
# Echo endpoint
curl -X POST http://localhost:8080/api/echo \
-H "Content-Type: application/json" \
-d '{"message": "Hello, Duso!"}'
http-server.du - Server setup and route registration
handlers/ - Individual endpoint handlers
home.du - HTML home pagehello.du - JSON greeting with query paramsecho.du - Echo back request data