If you don't have a server, Finger can also serve itself. You can install it via `go install` or use the Docker image.
Via `go install`:
```bash
go install git.maronato.dev/maronato/finger@latest
```
Via Docker:
```bash
docker run \
--name finger \
-p 8080:8080 \
-v ${PWD}/fingers.yml:/app/fingers.yml \
git.maronato.dev/maronato/finger
```
## Usage
If you installed it using `go install`, run
```bash
finger serve
```
To start the server on port `8080`. Your resources will be queryable via `locahost:8080/.well-known/webfinger?resource=<your-resource>`
If you're using Docker, the use the same command in the install section.
By default, no resources will be exposed. You can create resources via a `fingers.yml` file. It should contain a collection of resources as keys and their attributes as their objects.
Some default URN aliases are provided via the built-in mapping ([`urns.yml`](./urns.yml)). You can replace that with your own or use URNs directly in the `fingers.yml` file.
Here's an example:
```yaml
# fingers.yml
# Resources go in the root of the file. Email address will have the acct:
# prefix added automatically.
alice@example.com:
# "avatar" is an alias of "http://webfinger.net/rel/avatar"
# (see urns.yml for more)
avatar: "https://example.com/alice-pic"
# If the value is a URI, it'll be exposed as a webfinger link
openid: "https://sso.example.com/"
# If the value of the attribute is not a URI, it will be exposed as a
# webfinger property
name: "Alice Doe"
# You can also specify URN's directly instead of the aliases
Finger exposes two commands: `serve` and `healthcheck`. `serve` is the default command and starts the server. `healthcheck` is used by the Docker healthcheck to check if the server is up.
## Configs
Here are the config options available. You can change them via command line flags or environment variables: