HTTP Server Template

A complete REST API server demonstrating:

Running

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!"}'

Structure

Learn More