Update media handling
This commit is contained in:
20
README.md
20
README.md
@@ -6,7 +6,7 @@ Luxtools is now implemented entirely in Go. The project serves a retro-styled HT
|
||||
|
||||
```
|
||||
luxtools/
|
||||
├── assets/ # Runtime asset directory served from disk (/assets/*)
|
||||
├── media/ # Runtime media directory served from disk (/media/*)
|
||||
├── cmd/luxtools/ # Main program entrypoint
|
||||
├── internal/server/ # HTTP server, handlers, helpers, and tests
|
||||
├── web/
|
||||
@@ -33,7 +33,23 @@ The server listens on [http://127.0.0.1:5000](http://127.0.0.1:5000) and serves:
|
||||
- `/counter` — HTMX-powered counter snippet with server-side state
|
||||
- `/time` — current server timestamp
|
||||
- `/static/*` — vendored assets from `web/static`
|
||||
- `/assets/*` — runtime assets from the shared `assets` directory
|
||||
- `/media/*` — runtime media files served from the configured directory
|
||||
|
||||
### Configuration
|
||||
|
||||
The server looks for media files in the following order:
|
||||
|
||||
1. A directory specified via `--media-dir` on the command line.
|
||||
2. The `media_dir` value in an optional JSON config file passed with `--config`.
|
||||
3. A `media` directory located alongside the binary or in the current working directory.
|
||||
|
||||
Sample config file:
|
||||
|
||||
```json
|
||||
{
|
||||
"media_dir": "/var/lib/luxtools/media"
|
||||
}
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user