No description
- HTML 52.2%
- Go 47.8%
| cmd/server | ||
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| index.html | ||
| README.md | ||
Homelab Config Manager
A small Go API for managing homelab configurations and services.
Build
go build -o server ./cmd/server
Run
./server
The server listens on http://localhost:8080.
Read API Endpoints
The following endpoints are public read-only API endpoints you can use from bash scripts, curl, or other tools.
All endpoints return application/json and run on http://localhost:8080.
| Method | Path | Description |
|---|---|---|
GET |
/configs |
List all configuration entries. |
GET |
/configs/{id} |
Get a single configuration by its ID. |
GET |
/hosts |
List all hosts. |
GET |
/hosts/{id} |
Get a single host by its ID. |
GET |
/services |
List all services. |
GET |
/services/{id} |
Get a single service by its ID. |
GET |
/ports |
List all ports, including joined service name and host name. |
GET |
/services/{id}/ports |
List all ports belonging to a specific service. |
GET |
/ports/{id} |
Get a single port by its ID. |
Schema changes
The database version is tracked via PRAGMA user_version. If you change the schema, bump currentSchemaVersion in internal/db/db.go. The server will refuse to start against an older database and print a clear error. Just delete the database file and restart to get a fresh one.