Example API
The route surface exposed by the main example application.
Base URL
Section titled “Base URL”The example app runs by default at:
http://127.0.0.1:3000It also applies a global /api prefix.
Root routes
Section titled “Root routes”GET /api/GET /api/healthGET /api/health/db
Users routes
Section titled “Users routes”Versioned user routes live under /api/v1/users:
GET /api/v1/users/GET /api/v1/users/countGET /api/v1/users/{id}GET /api/v1/users/{id}/existsPOST /api/v1/users/PUT /api/v1/users/{id}PUT /api/v1/users/{id}/replaceDELETE /api/v1/users/{id}
Settings routes
Section titled “Settings routes”GET /api/v1/settings/runtimeGET /api/v1/settings/GET /api/v1/settings/{id}POST /api/v1/settings/PUT /api/v1/settings/{id}DELETE /api/v1/settings/{id}
Versioning demo
Section titled “Versioning demo”GET /api/v1/versioning/helloGET /api/v2/versioning/hello
Docs routes
Section titled “Docs routes”When OpenAPI docs are mounted, the example also exposes:
GET /openapi.jsonGET /docs
Error shape
Section titled “Error shape”Errors are returned in a consistent JSON structure:
{ "statusCode": 400, "error": "Bad Request", "message": "..."}