chore: add mise.toml for tool versions and tasks, thin Makefile shim
This commit is contained in:
29
README.md
29
README.md
@@ -15,30 +15,47 @@ A self-hosted working time tracker with a Go backend and a Svelte PWA frontend.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Tool versions are declared in `mise.toml`. Install [mise](https://mise.jdx.dev) and run `mise install` once to get the correct Go and Node versions.
|
||||
|
||||
### Development
|
||||
|
||||
```bash
|
||||
# 1. Set your auth token
|
||||
export AUTH_TOKEN=mysecrettoken
|
||||
# Install frontend dependencies (first time only)
|
||||
mise run install
|
||||
|
||||
# 2. Start both servers
|
||||
make dev
|
||||
# Start both servers (Go API + Vite dev server)
|
||||
mise run dev
|
||||
# Go API: http://localhost:8080
|
||||
# Vite UI: http://localhost:5173 (with /api proxy)
|
||||
```
|
||||
|
||||
`AUTH_TOKEN` defaults to `devtoken` in `mise.toml`. Override it by setting the variable in your environment before running.
|
||||
|
||||
Open `http://localhost:5173`, go to **Settings**, enter your token.
|
||||
|
||||
### Production (single binary)
|
||||
|
||||
```bash
|
||||
make build # builds web/ then embeds it in the Go binary
|
||||
mise run build # builds web/ then embeds it in the Go binary
|
||||
|
||||
# Run
|
||||
AUTH_TOKEN=mysecrettoken ./wotra
|
||||
# open http://localhost:8080
|
||||
```
|
||||
|
||||
### All tasks
|
||||
|
||||
| Task | Description |
|
||||
|---------------|--------------------------------------------------|
|
||||
| `mise run build` | Build production binary (web + Go) |
|
||||
| `mise run build:web` | Build Svelte frontend only |
|
||||
| `mise run build:go` | Build Go binary only |
|
||||
| `mise run dev` | Start API + UI dev servers concurrently |
|
||||
| `mise run dev:api` | Start Go API server only |
|
||||
| `mise run dev:ui` | Start Vite dev server only |
|
||||
| `mise run test` | Run all Go tests |
|
||||
| `mise run install` | Install frontend npm dependencies |
|
||||
| `mise run clean` | Remove build artifacts |
|
||||
|
||||
## Configuration (environment variables)
|
||||
|
||||
| Variable | Default | Description |
|
||||
|
||||
Reference in New Issue
Block a user