The repository contains the source code for the gateway of the VŠB E-Ink project. EInk-Gateway is a service, which stands between the E-Ink panels and the rest of the project's infrastructure. It is supposed to be a thin layer, with minimum logic. However, as the project is still in its early stages, the gateway is the only service, which is able to communicate with the panels. Therefore, it is currently also responsible for graphics processing coming to the panels and as a public API.
For a production like environment, the easiest way to install the gateway is to use the provided Docker image. The image is available on GitHub Container Registry. The image is based on the Alpine Linux distribution and contains only the necessary packages to run the service. The image is built automatically on every push to the master branch. Versioning is yet to be implemented.
- Node.js 18+
- pnpm 7+
- Clone the repository
- Install the dependencies using
pnpm install - Build the project using
pnpm build - Run the project using
pnpm startor directly usingnode dist/bin.js
The gateway can be configured using environment variables. The following variables are available:
| Variable | Description | Default | Required |
|---|---|---|---|
| PORT | Port on which the service will listen on | 8080 | No |
| HOST | Host on which the service will listen on | 0.0.0.0 | No |
| ADMIN_API_KEY_HASH | SHA256 hash of the admin API key, this needs to be provided | - | Yes |
The public facing API is yet to be documented, but there is an official E-Ink Gateway API CLI client, which can be used to interact with the gateway. The client is available in its own GitHub repository.