Shard Detail

rest-api v1.8.0

API service for interacting with PlaceOS.

Install & Use

Add the following code to your project's shard.yml under:

dependencies to use in production
- OR -
development_dependencies to use in development


rest-api:
  github: PlaceOS/rest-api
  version: 1.8.0

Readme

PlaceOS REST API

Build Status

Testing

crystal spec to run tests

Compiling

crystal build ./src/rest-api.cr

Dependencies

  • Elasticsearch ~> v7.2
  • RethinkDB ~> v2.3.6
  • Etcd ~> v3.3.13
  • Redis ~> v5

Deploying

Once compiled you are left with a binary ./rest-api

  • for help ./rest-api --help
  • viewing routes ./rest-api --routes
  • run on a different port or host ./rest-api -b 0.0.0.0 -p 80

Inspecting minimal images

  1. To view the env vars use docker inspect rest-api and find the Env section
  2. For a better view of env vars docker inspect -f '{{range $index, $value := .Config.Env}}{{println $value}}{{end}}' rest-api
  3. To signal the process use docker kill -s USR1 rest-api (debug mode)
  4. To signal the process use docker kill -s USR2 rest-api (default mode)