···2727https://lasa.example.org/did:plc:revjuqmkvrw6fnkxppqtszpv/3lwafzkjqm25s/atom
2828```
29293030+## Dev
3131+3232+Requires **just** as a command runner.
3333+3434+Starts the web server:
3535+```bash
3636+just
3737+# or
3838+just dev
3939+```
4040+4141+Starts Valkey in Docker and exposes its port:
4242+```bash
4343+just valkey
4444+```
4545+3046## Deploy
31473248Lasa is a standalone binary that requires nothing.
3349You can use Valkey as a cache.
5050+5151+### Building
34523553Building binaries:
3654```bash
···39574058`build/lasad` is the daemon running the web server.
4159Run `lasad -h` to get the help.
6060+Read `lasad(1)` for more information.
42614362`build/lasa` is a CLI.
4463Run `lasa -h` to get the help.
6464+Read `lasa(1)` for more information.
45654666You must have **scdoc** installed to build the man pages.
6767+If scdoc is not installed, it skips the building.
6868+6969+You can use
7070+```bash
7171+just build-docker localhost/lasa
7272+```
7373+to build the Dockerfile containing `lasa` and `lasad`.
7474+You can replace `localhost/lasa` by the name of the image.
7575+7676+### Installing
7777+7878+Building and installing binaries and man pages to `/usr/local/`:
7979+```bash
8080+just install
8181+```
+16-5
justfile
···11builder := 'go build -ldflags "-s -w"'
22testConfig := '"test.toml"'
3344+docker := 'podman'
55+46dev:
57 if [[ ! -f {{testConfig}} ]]; then go run ./cmd/lasad/ gen-config -c {{testConfig}}; fi
68 go run ./cmd/lasad/ -c {{testConfig}}
791010+valkey:
1111+ {{docker}} run --rm --name valkey -p 6379:6379 -d docker.io/valkey/valkey:alpine
1212+813build: build-lasa build-lasad
9141015build-lasa:
1116 {{builder}} -o build/lasa ./cmd/lasa/
1212- just build-doc lasa
1717+ # do not require building man pages
1818+ -just build-doc lasa
13191420build-lasad:
1521 {{builder}} -o build/lasad ./cmd/lasad/
1616- just build-doc lasad
2222+ # do not require building man pages
2323+ -just build-doc lasad
17241825build-doc file:
1926 scdoc < {{file}}.1.scd > build/{{file}}.1
20272828+build-docker name:
2929+ {{docker}} build -t {{name}} .
3030+2131install: build
2232 mv build/lasa /usr/local/bin/
2333 mv build/lasad /usr/local/bin/
2424- mkdir -p /usr/local/man/man1
2525- mv build/lasa.1 /usr/local/man/man1/
2626- mv build/lasad.1 /usr/local/man/man1/
3434+ # if cannot install man pages, skip
3535+ -mkdir -p /usr/local/man/man1
3636+ -mv build/lasa.1 /usr/local/man/man1/
3737+ -mv build/lasad.1 /usr/local/man/man1/