Files
2026-03-14 18:46:48 +01:00

24 lines
927 B
Markdown

# music-index
Music collection software for indexing bought (physical) albums. Build with Golang and Postgres
## Authentication
JWT authentication is enabled for protected endpoints.
Set these environment variables for the API:
- `JWT_SECRET` (required)
- `JWT_ISSUER` (optional, defaults to `music-index-api`)
- `JWT_TTL_MINUTES` (optional, defaults to `60`)
Get a token via `POST /api/v1/users/login` and include it as:
`Authorization: Bearer <token>`
## Swagger
The API documentation is available at [/api/v1/swagger/index.html](http://localhost:8080/api/v1/swagger/index.html) after running the application. It provides details about the available endpoints, request/response formats, and other relevant information for developers to interact with the API effectively.
Regenerate the docs with the following command in the /api/ folder:
```
go run github.com/swaggo/swag/cmd/swag@v1.16.4 init -g main.go -o docs
```