@ -10,7 +10,7 @@ Micro-service for file storage and processing written in Go.
## Requirements
- [Go 1.17+](https://go.dev/)
- [*Docker*](https://docs.docker.com/) (optional)
- [_Docker_](https://docs.docker.com/) (optional)
## Setup
@ -56,13 +56,43 @@ go test ./... -v
docker run --rm -v "$PWD":/usr/src/lithium -w /usr/src/lithium golang:1.17 go test ./...
```
## Configuration
Config options can be adjusted via the [`settings.json`](settings.json) file in the root directory.
```json
{
"endpoint": "0.0.0.0:8000",
"token": "changeme",
"rate_limiter": {
"requests_per_minute": 20,
"allowed_burst": 5
},
"storage_provider": {
"type": 0,
"base_path": "assets"
}
}
```
## Rate Limiting
By default, the rate limiting takes place on a per-route basis. When the limit for a specific route is hit, the response will return a status code `429: Too Many Requests`.