spaceapid/README.md
Bendodroid 1a9922d5f1
Change initial SpaceAPI response source
- The environment variable is now called SPACE_API_JSON_TEMPLATE_PATH
- It is now the path to a file with the initial values, not the JSON itself
- Updated README.md accordingly
2023-11-04 23:31:24 +01:00

688 B

SpaceAPI Daemon

spaceapid serves a SpaceAPI-compatible JSON on port 8080:

curl -X GET http://localhost:8080

The state of the boolean state->open property can be modified via /state/open:

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 apart from the Go standard library.

go build .

Running

Substitute the environment variables with appropriate custom values.

env DOORIS_USERNAME=user DOORIS_PASSWORD=password SPACE_API_JSON_TEMPLATE_PATH=ccchh-template.json go run .