index : license-api-rs.git

ascending towards madness

# license-api-rs

A drop-in Rust implementation of [my old open source license api]https://git.holly.sh/license-api.git that was written in PHP.

## Usage

```
LICENSE_API_DATABASE="/path_to/your/license_database.yml"
cargo build
cargo run

curl 0.0.0.0:8080/
curl 0.0.0.0:8080/list
curl 0.0.0.0:8080/list/full
curl 0.0.0.0:8080/<license>
```

## Configuration

The server by default will run on `0.0.0.0:8080` with a base URL of `/`

There is no default database set.

Configuration is done through environment variables.

```shell
export LICENSE_API_BASE_URL="/"
export LICENSE_API_DATABASE="/path_to/your/license_database.yml"
export LICENSE_API_SERVER_IP="0.0.0.0"
export LICENSE_API_SERVER_PORT="8080"
```

If `LICENSE_API_DATABASE` is not set, the server will refuse to start.

## License

- [AGPL 3.0]LICENSE