This is a small, production-ready Encore starter for HTTP services. It includes structured logging, metrics, and clean API patterns out of the box.
f setupto install dependenciesf devto run the development serverf testto run tests
Once running, open the local dev dashboard at http://localhost:9400 to inspect
traces, logs, and metrics.
GET /healthzhealth checkGET /v1/hello/:namegreetingPOST /v1/messagescreate an in-memory messageGET /v1/messages/:idfetch a message by id
Example:
curl http://localhost:4000/healthz
curl http://localhost:4000/v1/hello/encore
curl -X POST http://localhost:4000/v1/messages \
-H 'Content-Type: application/json' \
-d '{"client_id":"demo","body":"hello"}'- Logging uses
encore.dev/rlog, which is automatically tied to request traces. - Metrics are emitted via
encore.dev/metricsinapi/metrics.go. - Tracing is automatic in Encore; inspect it in the local dev dashboard.
Defaults live in api/config.cue and are loaded with encore.dev/config:
ReadOnly: disable writes to the service.DefaultGreeting: base greeting for the hello endpoint.MaxMessageLength: validation for message bodies.