o
odinpkg.dev
packages / library / odin-http-server

odin-http-server

a5402b4library

Dummy project to learn Odin lang and OpenSpec

No license · updated 22 hours ago

odin-http-server

Minimal Odin HTTP server scaffold driven by OpenSpec.

Run Locally

Prerequisites:

  • Odin compiler installed and available in PATH.

Default listen address:

  • 127.0.0.1:8080

Override listen address via environment variable:

  • ODIN_HTTP_ADDR=127.0.0.1:9090

Run command:

odin run ./cmd/server

Manual Review Checklist

  1. Start server with odin run ./cmd/server.
  2. Verify root endpoint:
    • curl -i http://localhost:8080/
    • Expect status 200 and body {"service":"odin-http-server","status":"ok"}
  3. Verify health endpoint:
    • curl -i http://localhost:8080/health
    • Expect status 200 and body {"status":"ok"}
  4. Verify unknown endpoint:
    • curl -i http://localhost:8080/unknown
    • Expect status 404 and JSON error response.
  5. Verify environment override:
    • ODIN_HTTP_ADDR=127.0.0.1:9090 odin run ./cmd/server
    • curl -i http://localhost:9090/health