Add README

This commit is contained in:
Bendodroid 2023-11-04 22:42:37 +01:00
parent 930e81bd7f
commit 27a054d985
Signed by: bendodroid
GPG key ID: 3EEE19A0F73D5FFC

32
README.md Normal file
View file

@ -0,0 +1,32 @@
# SpaceAPI Daemon
`spaceapid` serves a [SpaceAPI](https://spaceapi.io)-compatible JSON on port
8080:
```shell
curl -X GET http://localhost:8080
```
The state of the boolean `state->open` property can be modified via
`/state/open`:
```shell
curl -X PUT -u user:password -d true http://localhost:8080/state/open
```
## Building
See the `go.mod` file for minimum required Go version. There are currently no
dependencies other than the Go standard library.
```shell
go build .
```
## Running
Substitute the environment variables with appropriate custom values.
```shell
env DOORIS_USERNAME=user DOORIS_PASSWORD=password SPACE_API_JSON="$(cat ccchh-template.json)" go run .
```